-------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/jamielee/Dropbox/Convenios de Fuerza Project w- JS/Journal Articles/LARR submission/LARR final submission/Replication_data/Logs/rep
> lication.log
  log type:  text
 opened on:  16 Dec 2025, 15:05:02

. 
. 
. /**********************************************************************
> PANEL DATA ANALYSIS
> **********************************************************************/
. use "$CLEAN/Gillooly_Shenk_CCdata.dta", clear

. xtset codmpio ano

Panel variable: codmpio (unbalanced)
 Time variable: ano, 2002 to 2021, but with gaps
         Delta: 1 unit

. 
. 
. /**********************************************************************
> Main models (Table 1)
> **********************************************************************/
. **threats**
. xtpoisson o_amenazas convenio coca regalias i.ano, vce(robust) fe  
note: 21 groups (21 obs) dropped because of only one obs per group
note: 29 groups (200 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -217734.02  
Iteration 1:  Log pseudolikelihood = -153104.77  
Iteration 2:  Log pseudolikelihood = -149397.91  
Iteration 3:  Log pseudolikelihood = -149392.09  
Iteration 4:  Log pseudolikelihood = -149392.09  

Conditional fixed-effects Poisson regression        Number of obs    =  16,559
Group variable: codmpio                             Number of groups =   1,062

                                                    Obs per group:
                                                                 min =       2
                                                                 avg =    15.6
                                                                 max =      19

                                                    Wald chi2(20)    = 1517.37
Log pseudolikelihood = -149392.09                   Prob > chi2      =  0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1479348   .0984068    -1.50   0.133    -.3408086    .0449391
        coca |   .4668975   .1377712     3.39   0.001     .1968709    .7369241
    regalias |  -5.58e-12   2.87e-12    -1.94   0.052    -1.12e-11    5.23e-14
             |
         ano |
       2003  |   -.326859   .0577697    -5.66   0.000    -.4400856   -.2136324
       2004  |   -.465084   .0505414    -9.20   0.000    -.5641433   -.3660246
       2005  |  -.6101748   .0597868   -10.21   0.000    -.7273547   -.4929949
       2006  |  -.8063339   .0595257   -13.55   0.000    -.9230021   -.6896658
       2007  |  -.9208372   .0630334   -14.61   0.000     -1.04438   -.7972939
       2008  |  -.9031872   .0723104   -12.49   0.000    -1.044913   -.7614615
       2009  |  -.8984669   .1087384    -8.26   0.000     -1.11159   -.6853435
       2010  |   -.674234   .0876963    -7.69   0.000    -.8461156   -.5023525
       2011  |  -.2485682    .088029    -2.82   0.005    -.4211018   -.0760346
       2012  |   .7447859   .0886891     8.40   0.000     .5709585    .9186132
       2013  |   .7582054   .0972646     7.80   0.000     .5675702    .9488406
       2014  |    .817794     .11774     6.95   0.000     .5870277     1.04856
       2015  |   .5342541   .0956924     5.58   0.000     .3467005    .7218077
       2016  |    .257633   .1005971     2.56   0.010     .0604662    .4547997
       2017  |   .2040815   .1132623     1.80   0.072    -.0179084    .4260714
       2018  |    .382577   .1279654     2.99   0.003     .1317694    .6333846
       2019  |   .3968592   .1156187     3.43   0.001     .1702507    .6234677
       2020  |  -.2175755   .1190131    -1.83   0.068    -.4508368    .0156858
------------------------------------------------------------------------------

. 
. **detentions**
. xtpoisson num_arrests convenio regalias coca i.ano, vce(robust) fe 
note: 834 groups (15828 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -10987.208  
Iteration 1:  Log pseudolikelihood =  -9897.132  
Iteration 2:  Log pseudolikelihood = -9632.8494  
Iteration 3:  Log pseudolikelihood =  -9629.905  
Iteration 4:  Log pseudolikelihood = -9629.9038  
Iteration 5:  Log pseudolikelihood = -9629.9038  

Conditional fixed-effects Poisson regression         Number of obs    =  5,453
Group variable: codmpio                              Number of groups =    287

                                                     Obs per group:
                                                                  min =     19
                                                                  avg =   19.0
                                                                  max =     19

                                                     Wald chi2(20)    = 233.96
Log pseudolikelihood = -9629.9038                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.2392851   .1798704    -1.33   0.183    -.5918246    .1132544
    regalias |  -2.30e-12   7.52e-12    -0.31   0.760    -1.70e-11    1.24e-11
        coca |   1.473927   .5954089     2.48   0.013     .3069469    2.640907
             |
         ano |
       2003  |   .8269542   .4036005     2.05   0.040     .0359119    1.617997
       2004  |   .6112244   .4040013     1.51   0.130    -.1806036    1.403052
       2005  |   .1376689   .4377946     0.31   0.753    -.7203927    .9957306
       2006  |   .2382792   .4031131     0.59   0.554    -.5518079    1.028366
       2007  |   .0479569   .4008855     0.12   0.905    -.7377642    .8336779
       2008  |   -.083312   .4708425    -0.18   0.860    -1.006146    .8395224
       2009  |   -.866885   .3500779    -2.48   0.013    -1.553025   -.1807449
       2010  |  -.7314667   .5377136    -1.36   0.174    -1.785366    .3224325
       2011  |  -1.224262   .4439317    -2.76   0.006    -2.094352   -.3541723
       2012  |  -.6130238   .3808089    -1.61   0.107    -1.359396    .1333479
       2013  |   .1606543   .4926418     0.33   0.744    -.8049058    1.126214
       2014  |   -1.69608   .4562707    -3.72   0.000    -2.590354   -.8018056
       2015  |  -.7585686   .4472227    -1.70   0.090    -1.635109    .1179718
       2016  |  -.8988672    .569014    -1.58   0.114    -2.014114    .2163798
       2017  |  -.6905415   .5872989    -1.18   0.240    -1.841626    .4605432
       2018  |  -1.371479   .5510394    -2.49   0.013    -2.451497   -.2914618
       2019  |  -1.048889   .4805014    -2.18   0.029    -1.990655   -.1071238
       2020  |  -1.819898   .5056151    -3.60   0.000    -2.810885   -.8289105
------------------------------------------------------------------------------

. 
. **social leader assasinations**
. preserve

. keep if ano > 2015
(15,721 observations deleted)

. xtpoisson socialleaderkilled convenio coca regalias i.ano, vce(robust) fe  
note: 899 groups (4493 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =  -731.9835  
Iteration 1:  Log pseudolikelihood = -625.10363  
Iteration 2:  Log pseudolikelihood = -611.43162  
Iteration 3:  Log pseudolikelihood = -610.78357  
Iteration 4:  Log pseudolikelihood = -610.78161  
Iteration 5:  Log pseudolikelihood = -610.78161  

Conditional fixed-effects Poisson regression         Number of obs    =  1,105
Group variable: codmpio                              Number of groups =    221

                                                     Obs per group:
                                                                  min =      5
                                                                  avg =    5.0
                                                                  max =      5

                                                     Wald chi2(6)     = 116.74
Log pseudolikelihood = -610.78161                    Prob > chi2      = 0.0000

                                      (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------------
                   |               Robust
socialleaderkilled | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
          convenio |  -.3554942   .2289691    -1.55   0.121    -.8042653    .0932769
              coca |    .177243   .2674706     0.66   0.508    -.3469897    .7014757
          regalias |   4.32e-11   3.30e-12    13.09   0.000     3.68e-11    4.97e-11
                   |
               ano |
             2017  |   1.865003   .2795887     6.67   0.000     1.317019    2.412987
             2018  |   2.487291    .273184     9.10   0.000     1.951861    3.022722
             2019  |   2.092136   .2736266     7.65   0.000     1.555838    2.628434
             2020  |   2.486525   .3042084     8.17   0.000     1.890287    3.082763
------------------------------------------------------------------------------------

. restore

. 
. **homicidios*
. xtpoisson homicidios convenio coca regalias i.ano, vce(robust) fe 
note: 30 groups (509 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -56930.645  
Iteration 1:  Log pseudolikelihood = -52808.501  
Iteration 2:  Log pseudolikelihood =   -52732.2  
Iteration 3:  Log pseudolikelihood = -52732.141  
Iteration 4:  Log pseudolikelihood = -52732.141  

Conditional fixed-effects Poisson regression         Number of obs    = 19,306
Group variable: codmpio                              Number of groups =  1,090

                                                     Obs per group:
                                                                  min =     17
                                                                  avg =   17.7
                                                                  max =     18

                                                     Wald chi2(19)    = 415.28
Log pseudolikelihood = -52732.141                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .0160131   .0529709     0.30   0.762     -.087808    .1198342
        coca |   .2928548    .070947     4.13   0.000     .1538012    .4319083
    regalias |  -1.79e-12   2.07e-12    -0.86   0.389    -5.85e-12    2.28e-12
             |
         ano |
       2004  |  -.1282531   .0282415    -4.54   0.000    -.1836055   -.0729007
       2005  |  -.2400717   .0298677    -8.04   0.000    -.2986113   -.1815322
       2006  |  -.2571502   .0346092    -7.43   0.000     -.324983   -.1893175
       2007  |  -.2721616   .0332267    -8.19   0.000    -.3372848   -.2070384
       2008  |  -.3571504   .0370568    -9.64   0.000    -.4297803   -.2845205
       2009  |  -.4242794   .0377291   -11.25   0.000     -.498227   -.3503317
       2010  |  -.4484941   .0418239   -10.72   0.000    -.5304675   -.3665208
       2011  |  -.4323237   .0471691    -9.17   0.000    -.5247734   -.3398739
       2012  |  -.3626731   .0439094    -8.26   0.000     -.448734   -.2766123
       2013  |  -.4164006   .0524721    -7.94   0.000     -.519244   -.3135573
       2014  |  -.5704533   .0476419   -11.97   0.000    -.6638297   -.4770768
       2015  |  -.6052072   .0487463   -12.42   0.000    -.7007482   -.5096662
       2016  |   -.637056   .0454386   -14.02   0.000     -.726114    -.547998
       2017  |  -.6441967   .0441669   -14.59   0.000    -.7307623   -.5576312
       2018  |  -.5795102   .0484148   -11.97   0.000    -.6744016   -.4846189
       2019  |  -.5746888   .0453514   -12.67   0.000     -.663576   -.4858017
       2020  |   -.655274   .0438124   -14.96   0.000    -.7411448   -.5694032
------------------------------------------------------------------------------

. 
. **armed confrontations*
. xtpoisson cont_arm convenio coca regalias i.ano, vce(robust) fe  
note: 980 groups (16659 obs) dropped because of all zero outcomes
note: coca omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -621.38495  
Iteration 1:  Log pseudolikelihood = -490.81665  
Iteration 2:  Log pseudolikelihood = -457.41458  
Iteration 3:  Log pseudolikelihood = -450.54259  
Iteration 4:  Log pseudolikelihood = -449.02895  
Iteration 5:  Log pseudolikelihood = -448.65977  
Iteration 6:  Log pseudolikelihood = -448.58151  
Iteration 7:  Log pseudolikelihood = -448.56499  
Iteration 8:  Log pseudolikelihood =  -448.5613  
Iteration 9:  Log pseudolikelihood = -448.56039  
Iteration 10: Log pseudolikelihood = -448.56021  
Iteration 11: Log pseudolikelihood = -448.56017  
Iteration 12: Log pseudolikelihood = -448.56016  

Conditional fixed-effects Poisson regression       Number of obs    =    2,380
Group variable: codmpio                            Number of groups =      140

                                                   Obs per group:
                                                                min =       17
                                                                avg =     17.0
                                                                max =       17

                                                   Wald chi2(17)    = 29675.36
Log pseudolikelihood = -448.56016                  Prob > chi2      =   0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1590173   .3423323    -0.46   0.642    -.8299762    .5119417
    regalias |   1.74e-12   1.44e-11     0.12   0.904    -2.65e-11    2.99e-11
             |
         ano |
       2004  |  -1.171207   .2461525    -4.76   0.000    -1.653656   -.6887566
       2005  |   -.781401   .2427445    -3.22   0.001    -1.257171   -.3056305
       2006  |  -1.390223   .3164233    -4.39   0.000    -2.010401   -.7700446
       2007  |  -2.023558   .3644276    -5.55   0.000    -2.737823   -1.309293
       2008  |   -2.35358   .3952763    -5.95   0.000    -3.128307   -1.578853
       2009  |  -1.655817   .3761292    -4.40   0.000    -2.393017    -.918617
       2010  |  -2.018996   .3253479    -6.21   0.000    -2.656666   -1.381326
       2011  |  -1.869261   .2800697    -6.67   0.000    -2.418188   -1.320335
       2012  |  -2.137641     .42889    -4.98   0.000     -2.97825   -1.297032
       2013  |  -3.043534   .5183702    -5.87   0.000    -4.059521   -2.027547
       2014  |  -2.347293   .4677894    -5.02   0.000    -3.264144   -1.430443
       2015  |  -3.738239   .6208632    -6.02   0.000    -4.955108   -2.521369
       2016  |  -19.18611   .1931656   -99.32   0.000    -19.56471   -18.80752
       2017  |  -19.19535   .1860235  -103.19   0.000    -19.55995   -18.83075
       2018  |  -19.18534   .1830162  -104.83   0.000    -19.54404   -18.82663
       2019  |  -19.19619   .1809132  -106.11   0.000    -19.55077   -18.84161
------------------------------------------------------------------------------

. 
. /**********************************************************************
> Main models (Table 2)
> **********************************************************************/
. 
. **threats**
. xtpoisson o_amenazas convenio oil coca regalias i.ano, vce(robust) fe  
note: 21 groups (21 obs) dropped because of only one obs per group
note: 29 groups (200 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -217734.02  
Iteration 1:  Log pseudolikelihood = -152737.04  
Iteration 2:  Log pseudolikelihood = -148948.51  
Iteration 3:  Log pseudolikelihood = -148942.29  
Iteration 4:  Log pseudolikelihood = -148942.29  

Conditional fixed-effects Poisson regression        Number of obs    =  16,559
Group variable: codmpio                             Number of groups =   1,062

                                                    Obs per group:
                                                                 min =       2
                                                                 avg =    15.6
                                                                 max =      19

                                                    Wald chi2(21)    = 1574.55
Log pseudolikelihood = -148942.29                   Prob > chi2      =  0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.3628369   .1806047    -2.01   0.045    -.7168155   -.0088582
         oil |   .3425517   .1736021     1.97   0.048     .0022979    .6828055
        coca |   .4652175   .1402705     3.32   0.001     .1902925    .7401426
    regalias |  -5.72e-12   2.72e-12    -2.10   0.036    -1.11e-11   -3.86e-13
             |
         ano |
       2003  |  -.3335364   .0580225    -5.75   0.000    -.4472584   -.2198144
       2004  |  -.4699046   .0507946    -9.25   0.000    -.5694602   -.3703491
       2005  |  -.6355003   .0636072    -9.99   0.000    -.7601681   -.5108325
       2006  |    -.81301   .0596376   -13.63   0.000    -.9298975   -.6961225
       2007  |  -.9238776   .0628502   -14.70   0.000    -1.047062   -.8006934
       2008  |  -.8987481   .0730332   -12.31   0.000    -1.041891   -.7556056
       2009  |  -.8954442   .1093734    -8.19   0.000    -1.109812   -.6810764
       2010  |  -.6741231   .0865343    -7.79   0.000    -.8437272   -.5045189
       2011  |  -.2788532   .0849502    -3.28   0.001    -.4453525   -.1123538
       2012  |   .7192707   .0856039     8.40   0.000     .5514901    .8870514
       2013  |   .7288281   .0899999     8.10   0.000     .5524316    .9052247
       2014  |   .7839367   .1068984     7.33   0.000     .5744197    .9934537
       2015  |   .5054158   .0903601     5.59   0.000     .3283134    .6825183
       2016  |   .2280879   .0946004     2.41   0.016     .0426746    .4135013
       2017  |   .1819504   .1109717     1.64   0.101      -.03555    .3994509
       2018  |   .3554289   .1227963     2.89   0.004     .1147525    .5961052
       2019  |   .3737726   .1139274     3.28   0.001      .150479    .5970662
       2020  |  -.2379991   .1181015    -2.02   0.044    -.4694737   -.0065245
------------------------------------------------------------------------------

. xtpoisson o_amenazas convenio metals coca regalias i.ano, vce(robust) fe 
note: 21 groups (21 obs) dropped because of only one obs per group
note: 29 groups (200 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -217734.02  
Iteration 1:  Log pseudolikelihood = -152670.38  
Iteration 2:  Log pseudolikelihood = -148835.25  
Iteration 3:  Log pseudolikelihood = -148828.12  
Iteration 4:  Log pseudolikelihood = -148828.12  

Conditional fixed-effects Poisson regression        Number of obs    =  16,559
Group variable: codmpio                             Number of groups =   1,062

                                                    Obs per group:
                                                                 min =       2
                                                                 avg =    15.6
                                                                 max =      19

                                                    Wald chi2(21)    = 1862.81
Log pseudolikelihood = -148828.12                   Prob > chi2      =  0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   -.063422   .1140107    -0.56   0.578    -.2868788    .1600349
      metals |   -.479622   .1971852    -2.43   0.015    -.8660978   -.0931462
        coca |   .4613787   .1362103     3.39   0.001     .1944114     .728346
    regalias |  -6.14e-12   3.02e-12    -2.03   0.042    -1.21e-11   -2.18e-13
             |
         ano |
       2003  |  -.3282356   .0578874    -5.67   0.000    -.4416929   -.2147783
       2004  |   -.464258   .0505582    -9.18   0.000    -.5633503   -.3651657
       2005  |   -.623087   .0607247   -10.26   0.000    -.7421053   -.5040687
       2006  |   -.803956   .0594464   -13.52   0.000    -.9204688   -.6874433
       2007  |   -.911491    .062533   -14.58   0.000    -1.034053   -.7889287
       2008  |  -.8846938   .0719231   -12.30   0.000    -1.025661    -.743727
       2009  |  -.8985917   .1088293    -8.26   0.000    -1.111893   -.6852902
       2010  |  -.6709793   .0866116    -7.75   0.000    -.8407348   -.5012237
       2011  |  -.2641058   .0874291    -3.02   0.003    -.4354636    -.092748
       2012  |   .7298895   .0903851     8.08   0.000      .552738     .907041
       2013  |   .7423635   .1007404     7.37   0.000      .544916    .9398111
       2014  |   .7959802   .1242908     6.40   0.000     .5523748    1.039586
       2015  |   .5144992   .0990316     5.20   0.000     .3204009    .7085974
       2016  |   .2388604   .1032176     2.31   0.021     .0365575    .4411633
       2017  |   .1887874   .1149186     1.64   0.100    -.0364489    .4140238
       2018  |   .3664894   .1233279     2.97   0.003     .1247711    .6082077
       2019  |    .383927   .1118924     3.43   0.001     .1646219     .603232
       2020  |  -.2284001   .1177867    -1.94   0.052    -.4592579    .0024576
------------------------------------------------------------------------------

. 
. **detentionss**
. xtpoisson num_arrests convenio oil regalias coca i.ano, vce(robust) fe  
note: 834 groups (15828 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -10987.208  
Iteration 1:  Log pseudolikelihood = -9832.1858  
Iteration 2:  Log pseudolikelihood = -9569.1639  
Iteration 3:  Log pseudolikelihood = -9566.3443  
Iteration 4:  Log pseudolikelihood = -9566.3432  
Iteration 5:  Log pseudolikelihood = -9566.3432  

Conditional fixed-effects Poisson regression         Number of obs    =  5,453
Group variable: codmpio                              Number of groups =    287

                                                     Obs per group:
                                                                  min =     19
                                                                  avg =   19.0
                                                                  max =     19

                                                     Wald chi2(21)    = 241.83
Log pseudolikelihood = -9566.3432                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -1.015665    .290633    -3.49   0.000    -1.585295   -.4460343
         oil |   1.110115   .3669636     3.03   0.002       .39088    1.829351
    regalias |  -5.32e-12   9.21e-12    -0.58   0.563    -2.34e-11    1.27e-11
        coca |    1.38682   .6121656     2.27   0.023     .1869976    2.586643
             |
         ano |
       2003  |   .7726641   .4136598     1.87   0.062    -.0380942    1.583422
       2004  |   .5902565   .4055978     1.46   0.146    -.2047007    1.385214
       2005  |   .0880511   .4361688     0.20   0.840     -.766824    .9429262
       2006  |   .2142298   .4008635     0.53   0.593    -.5714482    .9999078
       2007  |   .0309251   .4012877     0.08   0.939    -.7555844    .8174347
       2008  |  -.0623823   .4736277    -0.13   0.895    -.9906755     .865911
       2009  |  -.8211201   .3497176    -2.35   0.019    -1.506554   -.1356863
       2010  |  -.7333981   .5426813    -1.35   0.177    -1.797034    .3302378
       2011  |  -1.290268   .4513418    -2.86   0.004    -2.174882   -.4056545
       2012  |   -.665521   .3857479    -1.73   0.084    -1.421573    .0905309
       2013  |   .0723499   .5011064     0.14   0.885    -.9098006      1.0545
       2014  |  -1.797832   .4711371    -3.82   0.000    -2.721244   -.8744202
       2015  |  -.8176651   .4575115    -1.79   0.074    -1.714371     .079041
       2016  |  -.9560007   .5754596    -1.66   0.097    -2.083881    .1718794
       2017  |  -.7544196   .5703421    -1.32   0.186     -1.87227    .3634304
       2018  |  -1.429129   .5544447    -2.58   0.010    -2.515821   -.3424373
       2019  |  -1.095821   .4718607    -2.32   0.020    -2.020651   -.1709915
       2020  |  -1.831736   .5021067    -3.65   0.000    -2.815847   -.8476253
------------------------------------------------------------------------------

. xtpoisson num_arrests convenio metals regalias coca i.ano, vce(robust) fe
note: 834 groups (15828 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -10987.208  
Iteration 1:  Log pseudolikelihood =  -9853.527  
Iteration 2:  Log pseudolikelihood = -9589.7266  
Iteration 3:  Log pseudolikelihood = -9586.8745  
Iteration 4:  Log pseudolikelihood = -9586.8734  
Iteration 5:  Log pseudolikelihood = -9586.8734  

Conditional fixed-effects Poisson regression         Number of obs    =  5,453
Group variable: codmpio                              Number of groups =    287

                                                     Obs per group:
                                                                  min =     19
                                                                  avg =   19.0
                                                                  max =     19

                                                     Wald chi2(21)    = 246.00
Log pseudolikelihood = -9586.8734                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0945207    .185001    -0.51   0.609    -.4571161    .2680746
      metals |  -1.312427   .5194743    -2.53   0.012    -2.330578   -.2942757
    regalias |  -3.87e-12   8.80e-12    -0.44   0.660    -2.11e-11    1.34e-11
        coca |   1.421387   .6028381     2.36   0.018     .2398458    2.602928
             |
         ano |
       2003  |   .8099307   .4082722     1.98   0.047     .0097318     1.61013
       2004  |   .6232196   .4066859     1.53   0.125    -.1738701    1.420309
       2005  |   .1532355   .4399117     0.35   0.728    -.7089756    1.015447
       2006  |    .251595   .4049307     0.62   0.534    -.5420545    1.045245
       2007  |   .0791579    .403578     0.20   0.845    -.7118404    .8701562
       2008  |  -.0264217    .475917    -0.06   0.956     -.959202    .9063585
       2009  |  -.8492834   .3500093    -2.43   0.015    -1.535289   -.1632778
       2010  |  -.7152571   .5394077    -1.33   0.185    -1.772477    .3419626
       2011  |  -1.201639   .4506554    -2.67   0.008    -2.084907   -.3183703
       2012  |  -.5954191   .3845742    -1.55   0.122    -1.349171    .1583324
       2013  |    .149414   .4943296     0.30   0.762    -.8194541    1.118282
       2014  |  -1.715121   .4615134    -3.72   0.000    -2.619671   -.8105713
       2015  |  -.7450234   .4514046    -1.65   0.099     -1.62976    .1397134
       2016  |  -.8819091   .5728129    -1.54   0.124    -2.004602    .2407835
       2017  |  -.6923026   .5808422    -1.19   0.233    -1.830732    .4461272
       2018  |  -1.355039   .5533586    -2.45   0.014    -2.439602    -.270476
       2019  |  -1.028054   .4831994    -2.13   0.033    -1.975107   -.0810005
       2020  |  -1.791419   .5094533    -3.52   0.000    -2.789929   -.7929085
------------------------------------------------------------------------------

. 
. **social leader assasinations**
. preserve

. keep if ano > 2015
(15,721 observations deleted)

. xtpoisson socialleaderkilled convenio oil coca regalias i.ano, vce(robust) fe  
note: 899 groups (4493 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =  -731.9835  
Iteration 1:  Log pseudolikelihood = -625.08059  
Iteration 2:  Log pseudolikelihood =  -611.3931  
Iteration 3:  Log pseudolikelihood = -610.74647  
Iteration 4:  Log pseudolikelihood = -610.74449  
Iteration 5:  Log pseudolikelihood = -610.74449  

Conditional fixed-effects Poisson regression         Number of obs    =  1,105
Group variable: codmpio                              Number of groups =    221

                                                     Obs per group:
                                                                  min =      5
                                                                  avg =    5.0
                                                                  max =      5

                                                     Wald chi2(7)     = 116.81
Log pseudolikelihood = -610.74449                    Prob > chi2      = 0.0000

                                      (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------------
                   |               Robust
socialleaderkilled | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
          convenio |  -.4645476   .4188873    -1.11   0.267    -1.285552    .3564565
               oil |   .1418131   .4661019     0.30   0.761    -.7717298    1.055356
              coca |   .1772326    .267456     0.66   0.508    -.3469716    .7014367
          regalias |   4.31e-11   3.32e-12    12.98   0.000     3.66e-11    4.97e-11
                   |
               ano |
             2017  |   1.866585   .2791974     6.69   0.000     1.319368    2.413802
             2018  |   2.488814   .2731302     9.11   0.000     1.953489     3.02414
             2019  |    2.09336   .2734992     7.65   0.000     1.557311    2.629409
             2020  |   2.487568   .3040547     8.18   0.000     1.891631    3.083504
------------------------------------------------------------------------------------

. xtpoisson socialleaderkilled convenio metals coca regalias i.ano, vce(robust) fe
note: 899 groups (4493 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =  -731.9835  
Iteration 1:  Log pseudolikelihood = -625.09746  
Iteration 2:  Log pseudolikelihood = -611.42799  
Iteration 3:  Log pseudolikelihood = -610.78028  
Iteration 4:  Log pseudolikelihood = -610.77832  
Iteration 5:  Log pseudolikelihood = -610.77832  

Conditional fixed-effects Poisson regression         Number of obs    =  1,105
Group variable: codmpio                              Number of groups =    221

                                                     Obs per group:
                                                                  min =      5
                                                                  avg =    5.0
                                                                  max =      5

                                                     Wald chi2(7)     = 116.79
Log pseudolikelihood = -610.77832                    Prob > chi2      = 0.0000

                                      (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------------
                   |               Robust
socialleaderkilled | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
          convenio |  -.3521091   .2328183    -1.51   0.130    -.8084245    .1042064
            metals |  -.1079822   1.078648    -0.10   0.920    -2.222094     2.00613
              coca |    .177093   .2674505     0.66   0.508    -.3471003    .7012863
          regalias |   4.32e-11   3.30e-12    13.09   0.000     3.67e-11    4.97e-11
                   |
               ano |
             2017  |   1.865359   .2796341     6.67   0.000     1.317287    2.413432
             2018  |   2.487544   .2731879     9.11   0.000     1.952105    3.022982
             2019  |   2.092487   .2735965     7.65   0.000     1.556247    2.628726
             2020  |   2.486836   .3041588     8.18   0.000     1.890696    3.082976
------------------------------------------------------------------------------------

. restore

. 
. **homicidios*
. xtpoisson homicidios convenio oil coca regalias i.ano, vce(robust) fe
note: 30 groups (509 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -56930.645  
Iteration 1:  Log pseudolikelihood = -52794.181  
Iteration 2:  Log pseudolikelihood = -52717.901  
Iteration 3:  Log pseudolikelihood = -52717.842  
Iteration 4:  Log pseudolikelihood = -52717.842  

Conditional fixed-effects Poisson regression         Number of obs    = 19,306
Group variable: codmpio                              Number of groups =  1,090

                                                     Obs per group:
                                                                  min =     17
                                                                  avg =   17.7
                                                                  max =     18

                                                     Wald chi2(20)    = 420.42
Log pseudolikelihood = -52717.842                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0297306   .0569218    -0.52   0.601    -.1412953     .081834
         oil |   .0694545   .0850393     0.82   0.414    -.0972196    .2361285
        coca |   .2914266   .0694849     4.19   0.000     .1552386    .4276145
    regalias |  -1.99e-12   2.10e-12    -0.95   0.344    -6.10e-12    2.13e-12
             |
         ano |
       2004  |   -.129102   .0279837    -4.61   0.000     -.183949    -.074255
       2005  |  -.2424021   .0297989    -8.13   0.000    -.3008069   -.1839972
       2006  |  -.2579419   .0347762    -7.42   0.000     -.326102   -.1897818
       2007  |   -.272343   .0330093    -8.25   0.000    -.3370401   -.2076459
       2008  |  -.3547435   .0364515    -9.73   0.000    -.4261871   -.2832999
       2009  |  -.4195719   .0395871   -10.60   0.000    -.4971612   -.3419825
       2010  |   -.446279   .0424818   -10.51   0.000    -.5295417   -.3630162
       2011  |   -.436832   .0444795    -9.82   0.000    -.5240102   -.3496538
       2012  |  -.3658717   .0417516    -8.76   0.000    -.4477033   -.2840402
       2013  |  -.4207267   .0491345    -8.56   0.000    -.5170285   -.3244249
       2014  |  -.5751866   .0458217   -12.55   0.000    -.6649956   -.4853777
       2015  |  -.6075332   .0487067   -12.47   0.000    -.7029967   -.5120698
       2016  |  -.6398933   .0452833   -14.13   0.000    -.7286469   -.5511397
       2017  |  -.6462865   .0440207   -14.68   0.000    -.7325655   -.5600076
       2018  |   -.581751   .0485145   -11.99   0.000    -.6768377   -.4866644
       2019  |  -.5767638   .0457132   -12.62   0.000    -.6663599   -.4871677
       2020  |  -.6568687   .0444146   -14.79   0.000    -.7439198   -.5698177
------------------------------------------------------------------------------

. xtpoisson homicidios convenio metals coca regalias i.ano, vce(robust) fe  
note: 30 groups (509 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -56930.645  
Iteration 1:  Log pseudolikelihood = -52647.983  
Iteration 2:  Log pseudolikelihood = -52572.298  
Iteration 3:  Log pseudolikelihood = -52572.239  
Iteration 4:  Log pseudolikelihood = -52572.239  

Conditional fixed-effects Poisson regression         Number of obs    = 19,306
Group variable: codmpio                              Number of groups =  1,090

                                                     Obs per group:
                                                                  min =     17
                                                                  avg =   17.7
                                                                  max =     18

                                                     Wald chi2(20)    = 427.31
Log pseudolikelihood = -52572.239                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |    .055276   .0517359     1.07   0.285    -.0461245    .1566764
      metals |   -.339545   .0804229    -4.22   0.000     -.497171    -.181919
        coca |   .2804097   .0671809     4.17   0.000     .1487376    .4120817
    regalias |  -2.00e-12   1.99e-12    -1.01   0.314    -5.89e-12    1.89e-12
             |
         ano |
       2004  |  -.1268657   .0289526    -4.38   0.000    -.1836118   -.0701196
       2005  |   -.242464   .0303099    -8.00   0.000    -.3018703   -.1830577
       2006  |  -.2539626   .0348177    -7.29   0.000     -.322204   -.1857211
       2007  |  -.2662391   .0332902    -8.00   0.000    -.3314867   -.2009915
       2008  |  -.3395903   .0381385    -8.90   0.000    -.4143405   -.2648402
       2009  |  -.4244324   .0379076   -11.20   0.000    -.4987299   -.3501349
       2010  |  -.4470075   .0417646   -10.70   0.000    -.5288645   -.3651504
       2011  |  -.4396006   .0443947    -9.90   0.000    -.5266127   -.3525886
       2012  |  -.3677388   .0418453    -8.79   0.000    -.4497541   -.2857235
       2013  |  -.4228133   .0496081    -8.52   0.000    -.5200434   -.3255832
       2014  |  -.5793248   .0455834   -12.71   0.000    -.6686666   -.4899829
       2015  |  -.6094277   .0490128   -12.43   0.000    -.7054911   -.5133643
       2016  |  -.6402352   .0455485   -14.06   0.000    -.7295087   -.5509618
       2017  |  -.6465434   .0439657   -14.71   0.000    -.7327147   -.5603722
       2018  |  -.5812517   .0474275   -12.26   0.000    -.6742079   -.4882955
       2019  |  -.5758414   .0448723   -12.83   0.000    -.6637894   -.4878933
       2020  |  -.6543333   .0433258   -15.10   0.000    -.7392502   -.5694163
------------------------------------------------------------------------------

. 
. **armed confrontations*
. xtpoisson cont_arm convenio oil coca regalias i.ano, vce(robust) fe  
note: 980 groups (16659 obs) dropped because of all zero outcomes
note: coca omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -621.38495  
Iteration 1:  Log pseudolikelihood = -490.28156  
Iteration 2:  Log pseudolikelihood = -456.65331  
Iteration 3:  Log pseudolikelihood =   -449.774  
Iteration 4:  Log pseudolikelihood = -448.25885  
Iteration 5:  Log pseudolikelihood = -447.88968  
Iteration 6:  Log pseudolikelihood = -447.81126  
Iteration 7:  Log pseudolikelihood = -447.79472  
Iteration 8:  Log pseudolikelihood = -447.79103  
Iteration 9:  Log pseudolikelihood = -447.79012  
Iteration 10: Log pseudolikelihood = -447.78994  
Iteration 11: Log pseudolikelihood =  -447.7899  
Iteration 12: Log pseudolikelihood = -447.78989  

Conditional fixed-effects Poisson regression       Number of obs    =    2,380
Group variable: codmpio                            Number of groups =      140

                                                   Obs per group:
                                                                min =       17
                                                                avg =     17.0
                                                                max =       17

                                                   Wald chi2(18)    = 28419.13
Log pseudolikelihood = -447.78989                  Prob > chi2      =   0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.5296801   .4981041    -1.06   0.288    -1.505946     .446586
         oil |   .5388219   .6489613     0.83   0.406    -.7331189    1.810763
    regalias |   1.43e-12   1.42e-11     0.10   0.920    -2.64e-11    2.93e-11
             |
         ano |
       2004  |  -1.152124   .2376224    -4.85   0.000    -1.617856   -.6863928
       2005  |  -.7944308   .2459536    -3.23   0.001    -1.276491   -.3123707
       2006  |  -1.383809   .3089269    -4.48   0.000    -1.989294   -.7783232
       2007  |  -2.013237   .3550509    -5.67   0.000    -2.709124    -1.31735
       2008  |  -2.319991   .3915671    -5.92   0.000    -3.087449   -1.552534
       2009  |  -1.625123   .3650094    -4.45   0.000    -2.340528   -.9097179
       2010  |  -1.987398   .3141956    -6.33   0.000     -2.60321   -1.371586
       2011  |  -1.900196    .286457    -6.63   0.000    -2.461642   -1.338751
       2012  |   -2.16025   .4265331    -5.06   0.000     -2.99624   -1.324261
       2013  |   -3.07471   .5163232    -5.96   0.000    -4.086685   -2.062735
       2014  |  -2.378468   .4903131    -4.85   0.000    -3.339464   -1.417472
       2015  |   -3.76165   .6086124    -6.18   0.000    -4.954509   -2.568792
       2016  |  -19.21482   .2122959   -90.51   0.000    -19.63091   -18.79872
       2017  |  -19.20964   .1902768  -100.96   0.000    -19.58257    -18.8367
       2018  |  -19.20678   .2001932   -95.94   0.000    -19.59915    -18.8144
       2019  |  -19.20124   .1822136  -105.38   0.000    -19.55837   -18.84411
------------------------------------------------------------------------------

. xtpoisson cont_arm convenio metals coca regalias i.ano, vce(robust) fe  
note: 980 groups (16659 obs) dropped because of all zero outcomes
note: coca omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -621.38495  
Iteration 1:  Log pseudolikelihood = -489.22862  
Iteration 2:  Log pseudolikelihood = -455.05035  
Iteration 3:  Log pseudolikelihood = -448.16569  
Iteration 4:  Log pseudolikelihood = -446.64951  
Iteration 5:  Log pseudolikelihood = -446.28073  
Iteration 6:  Log pseudolikelihood = -446.20214  
Iteration 7:  Log pseudolikelihood = -446.18558  
Iteration 8:  Log pseudolikelihood = -446.18189  
Iteration 9:  Log pseudolikelihood = -446.18099  
Iteration 10: Log pseudolikelihood =  -446.1808  
Iteration 11: Log pseudolikelihood = -446.18076  
Iteration 12: Log pseudolikelihood = -446.18075  

Conditional fixed-effects Poisson regression       Number of obs    =    2,380
Group variable: codmpio                            Number of groups =      140

                                                   Obs per group:
                                                                min =       17
                                                                avg =     17.0
                                                                max =       17

                                                   Wald chi2(18)    = 29146.30
Log pseudolikelihood = -446.18075                  Prob > chi2      =   0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .0307181    .336304     0.09   0.927    -.6284257    .6898619
      metals |  -1.164064   .6877819    -1.69   0.091    -2.512092    .1839638
    regalias |   2.96e-12   1.54e-11     0.19   0.847    -2.72e-11    3.31e-11
             |
         ano |
       2004  |  -1.158876   .2407603    -4.81   0.000    -1.630758    -.686995
       2005  |  -.8283134   .2514638    -3.29   0.001    -1.321173   -.3354534
       2006  |  -1.375355   .3089547    -4.45   0.000    -1.980896   -.7698153
       2007  |  -2.003408   .3549958    -5.64   0.000    -2.699187   -1.307629
       2008  |  -2.288573   .3905955    -5.86   0.000    -3.054126    -1.52302
       2009  |  -1.631163   .3683238    -4.43   0.000    -2.353064   -.9092613
       2010  |  -2.036006   .3191566    -6.38   0.000    -2.661541    -1.41047
       2011  |  -1.936978    .285434    -6.79   0.000    -2.496418   -1.377537
       2012  |  -2.186395   .4224724    -5.18   0.000    -3.014425   -1.358364
       2013  |  -3.103346   .5208971    -5.96   0.000    -4.124285   -2.082406
       2014  |   -2.41515   .4820108    -5.01   0.000    -3.359874   -1.470426
       2015  |   -3.80386   .6065877    -6.27   0.000     -4.99275    -2.61497
       2016  |   -19.2506   .2123053   -90.67   0.000    -19.66671   -18.83448
       2017  |  -19.23848   .1916104  -100.40   0.000    -19.61402   -18.86293
       2018  |   -19.2371   .1998311   -96.27   0.000    -19.62877   -18.84544
       2019  |  -19.23275   .1867989  -102.96   0.000    -19.59887   -18.86663
------------------------------------------------------------------------------

. 
. 
. clear

. 
. /**********************************************************************
> Appendix analyses and robustness checks
> **********************************************************************/
. use "$CLEAN/Gillooly_Shenk_CCdata.dta", clear

. xtset codmpio ano

Panel variable: codmpio (unbalanced)
 Time variable: ano, 2002 to 2021, but with gaps
         Delta: 1 unit

. 
. 
. * Counts and basics
. quietly count

. local N_all = r(N)

. 
. quietly levelsof codmpio, local(munis)

. local n_munis : word count `munis'

. 
. quietly summarize ano

. local ymin = r(min)

. local ymax = r(max)

. local years_span = "`ymin'–`ymax'"

. 
. quietly summarize convenio

. local share_treat = r(mean)

. local share_treat_pct = 100*`share_treat'

. 
. quietly count if convenio==1 & oil==1

. local N_oil = r(N)

. quietly count if convenio==1 & metals==1

. local N_met = r(N)

. 
. * Write to Excel
. putexcel set "appendix_descriptives.xlsx", sheet("A2.1 Coverage") replace
note: file will be replaced when the first putexcel command is issued.

. putexcel A1=("Item") B1=("Value"), bold
file appendix_descriptives.xlsx saved

. putexcel A2=("Municipality-years")              B2=(`N_all')
file appendix_descriptives.xlsx saved

. putexcel A3=("Municipalities")                  B3=(`n_munis')
file appendix_descriptives.xlsx saved

. putexcel A4=("Years")                           B4=("`years_span'")
file appendix_descriptives.xlsx saved

. putexcel A5=("% muni-years with convenio")      B5=(`share_treat_pct')
file appendix_descriptives.xlsx saved

. putexcel A6=("# treated muni-years with oil")   B6=(`N_oil')
file appendix_descriptives.xlsx saved

. putexcel A7=("# treated muni-years with metals") B7=(`N_met')
file appendix_descriptives.xlsx saved

. 
. *a.2.2**
. set more off

. 
. preserve

.     * 1) Ensure one row per municipality–year
.     sort ano codmpio

.     by ano codmpio: keep if _n==1
(0 observations deleted)

. 
.     * 2) Flags
.     gen byte any_cc   = convenio==1

.     gen byte oil_cc   = convenio==1 & oil==1

.     gen byte metal_cc = convenio==1 & metals==1

. 
.     * 3) Denominator: # municipalities observed in each year
.     bys ano: gen byte _tag = _n==1

.     bys ano: egen muni_total = total(_tag)

.     drop _tag

. 
.     * 4) Collapse to year-level counts
.     collapse (sum) any_cc oil_cc metal_cc (max) muni_total, by(ano)

.     order ano muni_total any_cc oil_cc metal_cc

. 
.     * 5) Shares (optional but handy)
.     gen share_any   = any_cc   / muni_total

.     gen share_oil   = oil_cc   / muni_total

.     gen share_metal = metal_cc / muni_total

.     format share_* %6.3f

. 
.     * 6) Export
.     export excel using "appendix_descriptives.xlsx", ///
>         sheet("A2.2 By year") firstrow(variables) sheetreplace
file appendix_descriptives.xlsx saved

. restore

. * A2.3
. version 18

. set more off

. 
. * 0) Auto-detect treatment variable (edit list if needed)
. local treat_candidates "convenio convenio_dummy convenio_plus lconvenio"

. local TREAT ""

. foreach t in `treat_candidates' {
  2.     capture confirm variable `t'
  3.     if !_rc {
  4.         local TREAT "`t'"
  5.         continue, break
  6.     }
  7. }

. if "`TREAT'"=="" {
.     di as error "No treatment variable found among: `treat_candidates'. Aborting A2.3."
.     exit 111
. }

. di as txt "A2.3 using treatment variable: " as result "`TREAT'"
A2.3 using treatment variable: convenio

. 
. * 1) Choose variables (keep only those that exist AND are numeric)
. local outcomes_all "o_amenazas socialleaderkilled num_arrests homicidios cont_arm"

. local covars_all   "coca regalias"

. 
. local allvars ""

. foreach v in `outcomes_all' `covars_all' {
  2.     capture confirm variable `v'
  3.     if !_rc {
  4.         capture confirm numeric variable `v'
  5.         if !_rc local allvars `allvars' `v'
  6.         else di as error "Note: variable `v' exists but is non-numeric — skipping."
  7.     }
  8.     else di as error "Note: variable `v' not found — skipping."
  9. }

. if "`allvars'"=="" {
.     di as error "No requested numeric variables found; aborting A2.3."
.     exit 459
. }

. di as txt "A2.3 will summarize: " as result "`allvars'"
A2.3 will summarize: o_amenazas socialleaderkilled num_arrests homicidios cont_arm coca regalias

. 
. * -------------------- (1) OVERALL --------------------
. tempfile desc_overall

. postutil clear

. tempname p1

. postfile `p1' str30 varname double mean sd p25 p50 p75 max using `desc_overall', replace
(file /var/folders/b7/h5dd55qd0sg4p7yz_zwhnr1w0000gn/T//S_09870.000005 not found)

. foreach v of local allvars {
  2.     quietly summarize `v', detail
  3.     post `p1' ("`v'") (r(mean)) (r(sd)) (r(p25)) (r(p50)) (r(p75)) (r(max))
  4. }

. postclose `p1'

. 
. preserve

.     use `desc_overall', clear

.     export excel using "appendix_descriptives.xlsx", ///
>         sheet("A2.3 Overall") firstrow(variables) sheetreplace
file appendix_descriptives.xlsx saved

. restore

. 
. * -------------------- (2) BY TREATMENT + StdDiff --------------------
. tempfile desc_by

. postutil clear

. tempname p2

. postfile `p2' str30 varname double ///
>     mean0 sd0 N0 mean1 sd1 N1 using `desc_by', replace
(file /var/folders/b7/h5dd55qd0sg4p7yz_zwhnr1w0000gn/T//S_09870.000007 not found)

. 
. foreach v of local allvars {
  2.     quietly count if `TREAT'==0
  3.     local N0 = r(N)
  4.     quietly count if `TREAT'==1
  5.     local N1 = r(N)
  6. 
.     quietly summarize `v' if `TREAT'==0
  7.     local m0 = r(mean)
  8.     local s0 = r(sd)
  9. 
.     quietly summarize `v' if `TREAT'==1
 10.     local m1 = r(mean)
 11.     local s1 = r(sd)
 12. 
.     post `p2' ("`v'") (`m0') (`s0') (`N0') (`m1') (`s1') (`N1')
 13. }

. postclose `p2'

. 
. preserve

.     use `desc_by', clear

.     gen stddiff = (mean1-mean0) / sqrt((sd0^2 + sd1^2)/2)

.     format stddiff %6.3f

.     order varname mean0 sd0 N0 mean1 sd1 N1 stddiff

.     export excel using "appendix_descriptives.xlsx", ///
>         sheet("A2.3 ByTreat") firstrow(variables) sheetreplace
file appendix_descriptives.xlsx saved

. 
.     keep varname stddiff

.     export excel using "appendix_descriptives.xlsx", ///
>         sheet("A2.3 StdDiff") firstrow(variables) sheetreplace
file appendix_descriptives.xlsx saved

. restore

. 
. * A2.4: Descriptives within treated muni-years by sector ----------
. version 18

. set more off

. 
. * 0) auto-detect treatment variable (edit the list if needed)
. local treat_candidates "convenio convenio_dummy convenio_plus lconvenio"

. local TREAT ""

. foreach t in `treat_candidates' {
  2.     capture confirm variable `t'
  3.     if !_rc {
  4.         local TREAT "`t'"
  5.         continue, break
  6.     }
  7. }

. if "`TREAT'"=="" {
.     di as error "No treatment variable found among: `treat_candidates'. Aborting A2.4."
.     exit 111
. }

. di as txt "A2.4 using treatment variable: " as result "`TREAT'"
A2.4 using treatment variable: convenio

. 
. * 1) make sure sector flags exist
. capture confirm variable oil

. if _rc {
.     di as error "Variable 'oil' not found."; exit 111
. }

. capture confirm variable metals

. if _rc {
.     di as error "Variable 'metals' not found."; exit 111
. }

. 
. * 2) variables to summarize (keep only existing + numeric)
. local want "o_amenazas socialleaderkilled num_arrests homicidios cont_arm coca regalias"

. local ylist ""

. foreach v in `want' {
  2.     capture confirm variable `v'
  3.     if !_rc {
  4.         capture confirm numeric variable `v'
  5.         if !_rc local ylist `ylist' `v'
  6.         else di as error "Note: `v' exists but is non-numeric — skipping."
  7.     }
  8.     else di as error "Note: `v' not found — skipping."
  9. }

. if "`ylist'"=="" {
.     di as error "No numeric variables to summarize; aborting A2.4."
.     exit 459
. }

. di as txt "A2.4 will summarize: " as result "`ylist'"
A2.4 will summarize: o_amenazas socialleaderkilled num_arrests homicidios cont_arm coca regalias

. 
. * 3) compute stats within treated muni-years by sector
. tempfile a24

. postutil clear

. tempname P

. postfile `P' str32 varname double ///
>     mean_o sd_o N_o ///
>     mean_m sd_m N_m ///
>     mean_b sd_b N_b using `a24', replace
(file /var/folders/b7/h5dd55qd0sg4p7yz_zwhnr1w0000gn/T//S_09870.000009 not found)

. 
. preserve

.     * ensure one row per muni-year (defensive)
.     capture confirm variable codmpio

.     if !_rc {
.         capture confirm variable ano
.         if !_rc {
.             sort ano codmpio
.             by ano codmpio: keep if _n==1
(0 observations deleted)
.         }
.     }

. 
.     keep if `TREAT'==1
(20,968 observations deleted)

.     gen byte both = oil==1 & metals==1

. 
.     foreach v of local ylist {
  2.         quietly count if oil==1
  3.         local N_o = r(N)
  4.         quietly summarize `v' if oil==1
  5.         local mo = r(mean)
  6.         local so = r(sd)
  7. 
.         quietly count if metals==1
  8.         local N_m = r(N)
  9.         quietly summarize `v' if metals==1
 10.         local mm = r(mean)
 11.         local sm = r(sd)
 12. 
.         quietly count if both==1
 13.         local N_b = r(N)
 14.         quietly summarize `v' if both==1
 15.         local mb = r(mean)
 16.         local sb = r(sd)
 17. 
.         post `P' ("`v'") (`mo') (`so') (`N_o') ///
>                        (`mm') (`sm') (`N_m') ///
>                        (`mb') (`sb') (`N_b')
 18.     }

. restore

. postclose `P'

. 
. * 4) export to the SAME Excel workbook, new tab
. preserve

.     use `a24', clear

.     order varname mean_o sd_o N_o mean_m sd_m N_m mean_b sd_b N_b

.     export excel using "appendix_descriptives.xlsx", ///
>         sheet("A2.4 Sectors") firstrow(variables) sheetreplace
file appendix_descriptives.xlsx saved

. restore

. 
. 
. *****************ROBUTSNESS***********************
. //panel but with restricted time period//
. preserve

. keep if ano < 2011
(12,315 observations deleted)

. xtpoisson o_amenazas convenio oil regalias i.ano, vce(robust) fe  
note: 36 groups (36 obs) dropped because of only one obs per group
note: 50 groups (199 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -40313.489  
Iteration 1:  Log pseudolikelihood = -35476.832  
Iteration 2:  Log pseudolikelihood = -35226.994  
Iteration 3:  Log pseudolikelihood = -35226.537  
Iteration 4:  Log pseudolikelihood = -35226.537  

Conditional fixed-effects Poisson regression         Number of obs    =  7,419
Group variable: codmpio                              Number of groups =    988

                                                     Obs per group:
                                                                  min =      2
                                                                  avg =    7.5
                                                                  max =      9

                                                     Wald chi2(10)    = 290.33
Log pseudolikelihood = -35226.537                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1463455    .108675    -1.35   0.178    -.3593445    .0666536
         oil |  -.0861064   .1654384    -0.52   0.603    -.4103598    .2381469
    regalias |  -1.57e-12   7.88e-12    -0.20   0.842    -1.70e-11    1.39e-11
             |
         ano |
       2003  |  -.3232503   .0573734    -5.63   0.000    -.4357001   -.2108005
       2004  |  -.4578464   .0497186    -9.21   0.000     -.555293   -.3603997
       2005  |  -.5947712    .060186    -9.88   0.000    -.7127335   -.4768089
       2006  |  -.7946353   .0582343   -13.65   0.000    -.9087724   -.6804983
       2007  |  -.9066866   .0609371   -14.88   0.000    -1.026121    -.787252
       2008  |  -.8764304   .0689461   -12.71   0.000    -1.011562   -.7412984
       2009  |  -.8656911    .107943    -8.02   0.000    -1.077256   -.6541266
       2010  |  -.6466303   .0843373    -7.67   0.000    -.8119285   -.4813322
------------------------------------------------------------------------------

. xtpoisson num_arrests convenio oil regalias i.ano, vce(robust) fe  
note: 1 group (1 obs) dropped because of only one obs per group
note: 908 groups (8172 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -5522.9216  
Iteration 1:  Log pseudolikelihood = -5041.3196  
Iteration 2:  Log pseudolikelihood = -5001.2592  
Iteration 3:  Log pseudolikelihood = -5001.1547  
Iteration 4:  Log pseudolikelihood = -5001.1547  

Conditional fixed-effects Poisson regression         Number of obs    =  1,908
Group variable: codmpio                              Number of groups =    212

                                                     Obs per group:
                                                                  min =      9
                                                                  avg =    9.0
                                                                  max =      9

                                                     Wald chi2(10)    =  80.12
Log pseudolikelihood = -5001.1547                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.6556137   .3822437    -1.72   0.086    -1.404798    .0935703
         oil |   1.096288   .4316829     2.54   0.011      .250205    1.942371
    regalias |  -9.83e-12   1.89e-11    -0.52   0.603    -4.69e-11    2.72e-11
             |
         ano |
       2003  |   .7878742   .4277397     1.84   0.065    -.0504802    1.626229
       2004  |   .6258145    .411887     1.52   0.129    -.1814691    1.433098
       2005  |   .1424657   .4418405     0.32   0.747    -.7235258    1.008457
       2006  |   .2482921   .4110631     0.60   0.546    -.5573767    1.053961
       2007  |   .0564763   .4114856     0.14   0.891    -.7500206    .8629733
       2008  |  -.0149787   .4844135    -0.03   0.975    -.9644116    .9344543
       2009  |  -.8011241   .3587413    -2.23   0.026    -1.504244   -.0980041
       2010  |  -.7283809    .565131    -1.29   0.197    -1.836017    .3792555
------------------------------------------------------------------------------

. xtpoisson homicidios convenio oil regalias i.ano, vce(robust) fe  
note: 42 groups (336 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =   -23679.7  
Iteration 1:  Log pseudolikelihood = -22399.815  
Iteration 2:  Log pseudolikelihood = -22390.024  
Iteration 3:  Log pseudolikelihood = -22390.023  

Conditional fixed-effects Poisson regression         Number of obs    =  8,624
Group variable: codmpio                              Number of groups =  1,078

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 162.75
Log pseudolikelihood = -22390.023                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0322135   .0445504    -0.72   0.470    -.1195306    .0551036
         oil |   -.038773   .0772136    -0.50   0.616    -.1901088    .1125628
    regalias |   1.18e-12   2.92e-12     0.40   0.687    -4.55e-12    6.91e-12
             |
         ano |
       2004  |  -.1282395   .0273355    -4.69   0.000    -.1818161   -.0746629
       2005  |  -.2440202   .0289756    -8.42   0.000    -.3008113   -.1872291
       2006  |  -.2631107   .0333441    -7.89   0.000    -.3284639   -.1977574
       2007  |  -.2725118   .0316535    -8.61   0.000    -.3345514   -.2104721
       2008  |    -.36065   .0348762   -10.34   0.000     -.429006    -.292294
       2009  |  -.4226548   .0388588   -10.88   0.000    -.4988166    -.346493
       2010  |  -.4486633   .0427423   -10.50   0.000    -.5324367   -.3648899
------------------------------------------------------------------------------

. xtpoisson cont_arm convenio oil regalias i.ano, vce(robust) fe  
note: 992 groups (7936 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -382.58368  
Iteration 1:  Log pseudolikelihood = -336.75912  
Iteration 2:  Log pseudolikelihood = -317.60804  
Iteration 3:  Log pseudolikelihood = -317.37761  
Iteration 4:  Log pseudolikelihood = -317.37743  
Iteration 5:  Log pseudolikelihood = -317.37743  

Conditional fixed-effects Poisson regression         Number of obs    =  1,024
Group variable: codmpio                              Number of groups =    128

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 101.76
Log pseudolikelihood = -317.37743                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .1326389   .4590868     0.29   0.773    -.7671547    1.032433
         oil |   .0619149   .6475572     0.10   0.924    -1.207274    1.331104
    regalias |   3.21e-11   2.32e-11     1.38   0.167    -1.34e-11    7.75e-11
             |
         ano |
       2004  |  -1.148239   .2326931    -4.93   0.000     -1.60431   -.6921694
       2005  |  -.7284699   .2303079    -3.16   0.002    -1.179865   -.2770746
       2006  |  -1.378924   .2957422    -4.66   0.000    -1.958568   -.7992797
       2007  |  -2.055028    .351758    -5.84   0.000    -2.744461   -1.365595
       2008  |  -2.398999    .387104    -6.20   0.000    -3.157709   -1.640289
       2009  |  -1.674226   .3617232    -4.63   0.000     -2.38319   -.9652614
       2010  |  -2.075241   .3159972    -6.57   0.000    -2.694584   -1.455898
------------------------------------------------------------------------------

. 
. xtpoisson o_amenazas convenio metals regalias i.ano, vce(robust) fe
note: 36 groups (36 obs) dropped because of only one obs per group
note: 50 groups (199 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -40313.489  
Iteration 1:  Log pseudolikelihood = -35457.456  
Iteration 2:  Log pseudolikelihood = -35206.364  
Iteration 3:  Log pseudolikelihood = -35205.914  
Iteration 4:  Log pseudolikelihood = -35205.914  

Conditional fixed-effects Poisson regression         Number of obs    =  7,419
Group variable: codmpio                              Number of groups =    988

                                                     Obs per group:
                                                                  min =      2
                                                                  avg =    7.5
                                                                  max =      9

                                                     Wald chi2(10)    = 292.64
Log pseudolikelihood = -35205.914                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1451688   .0807665    -1.80   0.072    -.3034683    .0131307
      metals |  -.2276863    .247368    -0.92   0.357    -.7125187    .2571461
    regalias |  -1.60e-12   7.82e-12    -0.20   0.838    -1.69e-11    1.37e-11
             |
         ano |
       2003  |  -.3247876   .0576938    -5.63   0.000    -.4378654   -.2117098
       2004  |  -.4591125   .0499949    -9.18   0.000    -.5571008   -.3611242
       2005  |  -.6023838   .0592508   -10.17   0.000    -.7185132   -.4862543
       2006  |  -.7968194   .0590902   -13.48   0.000    -.9126341   -.6810047
       2007  |   -.906917   .0620097   -14.63   0.000    -1.028454   -.7853802
       2008  |  -.8710144   .0713109   -12.21   0.000    -1.010781   -.7312475
       2009  |  -.8657943   .1078234    -8.03   0.000    -1.077124   -.6544643
       2010  |  -.6484165   .0835637    -7.76   0.000    -.8121985   -.4846346
------------------------------------------------------------------------------

. xtpoisson num_arrests convenio metals regalias i.ano, vce(robust) fe
note: 1 group (1 obs) dropped because of only one obs per group
note: 908 groups (8172 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -5522.9216  
Iteration 1:  Log pseudolikelihood = -5068.2865  
Iteration 2:  Log pseudolikelihood = -5031.2941  
Iteration 3:  Log pseudolikelihood = -5031.2144  
Iteration 4:  Log pseudolikelihood = -5031.2144  

Conditional fixed-effects Poisson regression         Number of obs    =  1,908
Group variable: codmpio                              Number of groups =    212

                                                     Obs per group:
                                                                  min =      9
                                                                  avg =    9.0
                                                                  max =      9

                                                     Wald chi2(10)    =  66.70
Log pseudolikelihood = -5031.2144                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .1381781   .2057816     0.67   0.502    -.2651463    .5415026
      metals |  -.5619307   .6765348    -0.83   0.406    -1.887915    .7640532
    regalias |  -1.17e-11   1.97e-11    -0.59   0.552    -5.03e-11    2.69e-11
             |
         ano |
       2003  |   .8443798   .4135334     2.04   0.041     .0338693     1.65489
       2004  |   .6535348   .4094563     1.60   0.110    -.1489848    1.456054
       2005  |   .1966539   .4412065     0.45   0.656    -.6680949    1.061403
       2006  |   .2863248   .4116983     0.70   0.487    -.5205891    1.093239
       2007  |   .0950204   .4145997     0.23   0.819      -.71758    .9076208
       2008  |  -.0056461   .4887852    -0.01   0.991    -.9636475    .9523552
       2009  |  -.8368039   .3595763    -2.33   0.020    -1.541561   -.1320474
       2010  |  -.7094476     .56037    -1.27   0.206    -1.807753    .3888573
------------------------------------------------------------------------------

. xtpoisson homicidios convenio metals regalias i.ano, vce(robust) fe
note: 42 groups (336 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =   -23679.7  
Iteration 1:  Log pseudolikelihood = -22401.163  
Iteration 2:  Log pseudolikelihood = -22391.375  
Iteration 3:  Log pseudolikelihood = -22391.374  

Conditional fixed-effects Poisson regression         Number of obs    =  8,624
Group variable: codmpio                              Number of groups =  1,078

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 162.90
Log pseudolikelihood = -22391.374                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0502643   .0390715    -1.29   0.198     -.126843    .0263144
      metals |   .0151452   .0762615     0.20   0.843    -.1343246     .164615
    regalias |   1.03e-12   2.90e-12     0.36   0.722    -4.66e-12    6.72e-12
             |
         ano |
       2004  |  -.1289601   .0275883    -4.67   0.000    -.1830321   -.0748881
       2005  |  -.2449977   .0290612    -8.43   0.000    -.3019566   -.1880388
       2006  |  -.2635643   .0334009    -7.89   0.000    -.3290288   -.1980999
       2007  |  -.2734652   .0316487    -8.64   0.000    -.3354955   -.2114349
       2008  |  -.3608869   .0350037   -10.31   0.000    -.4294928   -.2922809
       2009  |   -.421232   .0387951   -10.86   0.000    -.4972691   -.3451949
       2010  |  -.4485546    .042674   -10.51   0.000    -.5321941   -.3649151
------------------------------------------------------------------------------

. xtpoisson cont_arm convenio metals regalias i.ano, vce(robust) fe
note: 992 groups (7936 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -382.58368  
Iteration 1:  Log pseudolikelihood = -336.40773  
Iteration 2:  Log pseudolikelihood = -317.30375  
Iteration 3:  Log pseudolikelihood =   -317.073  
Iteration 4:  Log pseudolikelihood = -317.07283  
Iteration 5:  Log pseudolikelihood = -317.07283  

Conditional fixed-effects Poisson regression         Number of obs    =  1,024
Group variable: codmpio                              Number of groups =    128

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     =  97.13
Log pseudolikelihood = -317.07283                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .2355968   .3915545     0.60   0.547    -.5318359     1.00303
      metals |  -.5314458   .7931703    -0.67   0.503    -2.086031    1.023139
    regalias |   3.33e-11   2.42e-11     1.38   0.169    -1.41e-11    8.07e-11
             |
         ano |
       2004  |  -1.149323   .2360491    -4.87   0.000    -1.611971   -.6866753
       2005  |  -.7420315   .2351994    -3.15   0.002    -1.203014   -.2810493
       2006  |  -1.376839   .2982186    -4.62   0.000    -1.961336   -.7923409
       2007  |  -2.044202   .3518796    -5.81   0.000    -2.733873   -1.354531
       2008  |  -2.367041    .386189    -6.13   0.000    -3.123958   -1.610125
       2009  |  -1.669243   .3631969    -4.60   0.000    -2.381096   -.9573901
       2010  |  -2.082116   .3191738    -6.52   0.000    -2.707685   -1.456546
------------------------------------------------------------------------------

. 
. restore

. 
. **lags**
. xtpoisson o_amenazas L.convenio L.oil coca regalias i.ano, vce(robust) fe  
note: 21 groups (21 obs) dropped because of only one obs per group
note: 31 groups (201 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -200090.43  
Iteration 1:  Log pseudolikelihood = -134979.11  
Iteration 2:  Log pseudolikelihood = -131488.34  
Iteration 3:  Log pseudolikelihood = -131482.56  
Iteration 4:  Log pseudolikelihood = -131482.56  

Conditional fixed-effects Poisson regression        Number of obs    =  15,611
Group variable: codmpio                             Number of groups =   1,058

                                                    Obs per group:
                                                                 min =       2
                                                                 avg =    14.8
                                                                 max =      18

                                                    Wald chi2(20)    = 1545.30
Log pseudolikelihood = -131482.56                   Prob > chi2      =  0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |  -.3669408   .1491211    -2.46   0.014    -.6592127   -.0746688
             |
         oil |
         L1. |   .3773359   .1495987     2.52   0.012     .0841278     .670544
             |
        coca |   .4230863   .1380756     3.06   0.002     .1524631    .6937096
    regalias |  -6.54e-12   3.28e-12    -1.99   0.047    -1.30e-11   -1.00e-13
             |
         ano |
       2004  |  -.1517918   .0492808    -3.08   0.002    -.2483803   -.0552033
       2005  |   -.279491    .057826    -4.83   0.000    -.3928279    -.166154
       2006  |  -.5236597   .0635513    -8.24   0.000     -.648218   -.3991015
       2007  |  -.6182703   .0578288   -10.69   0.000    -.7316127   -.5049278
       2008  |  -.5846631   .0750333    -7.79   0.000    -.7317256   -.4376005
       2009  |  -.5741703   .1098204    -5.23   0.000    -.7894144   -.3589262
       2010  |  -.3570299   .0926326    -3.85   0.000    -.5385863   -.1754734
       2011  |   .0986035   .0935135     1.05   0.292    -.0846796    .2818866
       2012  |   1.039235    .092157    11.28   0.000     .8586101    1.219859
       2013  |   1.044822   .0979716    10.66   0.000     .8528009    1.236842
       2014  |   1.106972   .1125585     9.83   0.000     .8863618    1.327583
       2015  |   .8218033   .0969573     8.48   0.000     .6317705    1.011836
       2016  |   .5465302     .10219     5.35   0.000     .3462414     .746819
       2017  |   .4951743   .1164092     4.25   0.000     .2670165    .7233322
       2018  |   .6704903   .1286522     5.21   0.000     .4183366     .922644
       2019  |   .6901903   .1204281     5.73   0.000     .4541555    .9262251
       2020  |   .1067079   .1247444     0.86   0.392    -.1377865    .3512024
------------------------------------------------------------------------------

. xtpoisson o_amenazas L.convenio L.metals coca regalias i.ano, vce(robust) fe 
note: 21 groups (21 obs) dropped because of only one obs per group
note: 31 groups (201 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -200090.43  
Iteration 1:  Log pseudolikelihood = -135183.82  
Iteration 2:  Log pseudolikelihood =  -131705.5  
Iteration 3:  Log pseudolikelihood = -131699.58  
Iteration 4:  Log pseudolikelihood = -131699.58  

Conditional fixed-effects Poisson regression        Number of obs    =  15,611
Group variable: codmpio                             Number of groups =   1,058

                                                    Obs per group:
                                                                 min =       2
                                                                 avg =    14.8
                                                                 max =      18

                                                    Wald chi2(20)    = 1581.79
Log pseudolikelihood = -131699.58                   Prob > chi2      =  0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |   -.065375   .0993273    -0.66   0.510     -.260053     .129303
             |
      metals |
         L1. |    -.35677     .17242    -2.07   0.039     -.694707   -.0188329
             |
        coca |   .4251498   .1342996     3.17   0.002     .1619275    .6883722
    regalias |  -6.37e-12   3.44e-12    -1.86   0.064    -1.31e-11    3.60e-13
             |
         ano |
       2004  |  -.1455866   .0488775    -2.98   0.003    -.2413848   -.0497884
       2005  |  -.2734395   .0575874    -4.75   0.000    -.3863087   -.1605703
       2006  |  -.5057805   .0608163    -8.32   0.000    -.6249782   -.3865828
       2007  |  -.6096333   .0578483   -10.54   0.000    -.7230139   -.4962527
       2008  |  -.5747448   .0745903    -7.71   0.000     -.720939   -.4285506
       2009  |  -.5658917   .1095892    -5.16   0.000    -.7806827   -.3511007
       2010  |  -.3609166   .0926428    -3.90   0.000    -.5424932     -.17934
       2011  |   .1000342   .0936179     1.07   0.285    -.0834536    .2835219
       2012  |   1.060055   .0969903    10.93   0.000     .8699572    1.250152
       2013  |   1.061693   .1061602    10.00   0.000     .8536233    1.269764
       2014  |   1.127183   .1265235     8.91   0.000     .8792011    1.375164
       2015  |   .8430161   .1055312     7.99   0.000     .6361787    1.049853
       2016  |   .5637361   .1101338     5.12   0.000     .3478778    .7795943
       2017  |   .5139284   .1215393     4.23   0.000     .2757158     .752141
       2018  |   .6835488   .1279857     5.34   0.000     .4327015    .9343961
       2019  |   .7082863   .1196236     5.92   0.000     .4738284    .9427442
       2020  |   .1215408   .1252794     0.97   0.332    -.1240023    .3670839
------------------------------------------------------------------------------

. 
. xtpoisson num_arrests L.convenio L.oil regalias coca i.ano, vce(robust) fe
note: 838 groups (15066 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -10240.345  
Iteration 1:  Log pseudolikelihood = -9138.4307  
Iteration 2:  Log pseudolikelihood = -8874.1153  
Iteration 3:  Log pseudolikelihood = -8871.0531  
Iteration 4:  Log pseudolikelihood = -8871.0517  
Iteration 5:  Log pseudolikelihood = -8871.0517  

Conditional fixed-effects Poisson regression         Number of obs    =  5,094
Group variable: codmpio                              Number of groups =    283

                                                     Obs per group:
                                                                  min =     18
                                                                  avg =   18.0
                                                                  max =     18

                                                     Wald chi2(20)    = 238.01
Log pseudolikelihood = -8871.0517                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |  -.5216332   .2711661    -1.92   0.054    -1.053109    .0098425
             |
         oil |
         L1. |   .8417564   .3566663     2.36   0.018     .1427033    1.540809
             |
    regalias |  -4.05e-12   9.80e-12    -0.41   0.680    -2.33e-11    1.52e-11
        coca |   1.327894   .5795914     2.29   0.022      .191916    2.463872
             |
         ano |
       2004  |  -.2503091   .2903604    -0.86   0.389     -.819405    .3187868
       2005  |  -.6909207   .3094858    -2.23   0.026    -1.297502   -.0843397
       2006  |  -.6248277   .2900509    -2.15   0.031    -1.193317   -.0563384
       2007  |  -.8132727    .305001    -2.67   0.008    -1.411064   -.2154817
       2008  |  -.9341098   .3521131    -2.65   0.008    -1.624239   -.2439808
       2009  |  -1.700215   .2867143    -5.93   0.000    -2.262164   -1.138265
       2010  |  -1.550177   .5012899    -3.09   0.002    -2.532687   -.5676666
       2011  |  -2.077609   .3504515    -5.93   0.000    -2.764482   -1.390737
       2012  |  -1.503218   .3576638    -4.20   0.000    -2.204227   -.8022102
       2013  |  -.7230249   .3806949    -1.90   0.058    -1.469173    .0231233
       2014  |  -2.619575   .3440944    -7.61   0.000    -3.293988   -1.945163
       2015  |  -1.674434   .3420812    -4.89   0.000    -2.344901   -1.003967
       2016  |  -1.771362   .4883895    -3.63   0.000    -2.728587   -.8141357
       2017  |  -1.555487   .5102352    -3.05   0.002     -2.55553   -.5554448
       2018  |  -2.254471   .5106511    -4.41   0.000    -3.255329   -1.253613
       2019  |  -1.917841    .392234    -4.89   0.000    -2.686606   -1.149077
       2020  |  -2.607873   .3938857    -6.62   0.000    -3.379875   -1.835871
------------------------------------------------------------------------------

. xtpoisson num_arrests L.convenio L.metals regalias coca i.ano, vce(robust) fe
note: 838 groups (15066 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -10240.345  
Iteration 1:  Log pseudolikelihood = -9163.4689  
Iteration 2:  Log pseudolikelihood =  -8899.101  
Iteration 3:  Log pseudolikelihood = -8896.0913  
Iteration 4:  Log pseudolikelihood = -8896.0898  
Iteration 5:  Log pseudolikelihood = -8896.0898  

Conditional fixed-effects Poisson regression         Number of obs    =  5,094
Group variable: codmpio                              Number of groups =    283

                                                     Obs per group:
                                                                  min =     18
                                                                  avg =   18.0
                                                                  max =     18

                                                     Wald chi2(20)    = 233.69
Log pseudolikelihood = -8896.0898                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |   .1051496   .1967208     0.53   0.593     -.280416    .4907152
             |
      metals |
         L1. |  -.7840066   .5511265    -1.42   0.155    -1.864195    .2961815
             |
    regalias |  -2.76e-12   9.09e-12    -0.30   0.762    -2.06e-11    1.51e-11
        coca |   1.378279   .5835865     2.36   0.018     .2344708    2.522088
             |
         ano |
       2004  |  -.2143609   .2895964    -0.74   0.459    -.7819593    .3532376
       2005  |  -.6601647   .3072652    -2.15   0.032    -1.262393   -.0579358
       2006  |  -.5690929   .2934292    -1.94   0.052    -1.144204    .0060178
       2007  |  -.7775293   .3029763    -2.57   0.010    -1.371352   -.1837066
       2008  |  -.8884693   .3504624    -2.54   0.011    -1.575363   -.2015756
       2009  |  -1.664049   .2874842    -5.79   0.000    -2.227507    -1.10059
       2010  |  -1.571387    .500711    -3.14   0.002    -2.552762   -.5900111
       2011  |  -2.057132   .3559507    -5.78   0.000    -2.754783   -1.359482
       2012  |  -1.421131   .3595427    -3.95   0.000    -2.125822   -.7164401
       2013  |  -.6615808   .3770509    -1.75   0.079    -1.400587    .0774254
       2014  |  -2.547034   .3362126    -7.58   0.000    -3.205998   -1.888069
       2015  |  -1.595714   .3286068    -4.86   0.000    -2.239771   -.9516566
       2016  |    -1.7082   .4869571    -3.51   0.000    -2.662619   -.7537821
       2017  |  -1.492492   .5057766    -2.95   0.003    -2.483796   -.5011877
       2018  |   -2.19564   .5109737    -4.30   0.000     -3.19713    -1.19415
       2019  |  -1.851068   .4012938    -4.61   0.000    -2.637589   -1.064546
       2020  |  -2.564679   .3995382    -6.42   0.000    -3.347759   -1.781598
------------------------------------------------------------------------------

. 
. preserve

. keep if ano > 2015
(15,721 observations deleted)

. xtpoisson socialleaderkilled L.convenio L.metals coca regalias i.ano, vce(robust) fe
note: 904 groups (3614 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -581.19579  
Iteration 1:  Log pseudolikelihood = -554.58692  
Iteration 2:  Log pseudolikelihood = -554.37699  
Iteration 3:  Log pseudolikelihood = -554.37696  

Conditional fixed-effects Poisson regression         Number of obs    =    864
Group variable: codmpio                              Number of groups =    216

                                                     Obs per group:
                                                                  min =      4
                                                                  avg =    4.0
                                                                  max =      4

                                                     Wald chi2(6)     =  29.91
Log pseudolikelihood = -554.37696                    Prob > chi2      = 0.0000

                                      (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------------
                   |               Robust
socialleaderkilled | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
          convenio |
               L1. |  -.1116297   .2513635    -0.44   0.657    -.6042931    .3810336
                   |
            metals |
               L1. |   .6380878   1.026901     0.62   0.534    -1.374602    2.650777
                   |
              coca |   .1625836   .2712938     0.60   0.549    -.3691425    .6943096
          regalias |  -1.61e-11   2.76e-11    -0.58   0.559    -7.01e-11    3.79e-11
                   |
               ano |
             2018  |   .5919772   .1673301     3.54   0.000     .2640162    .9199382
             2019  |   .2049763   .1807767     1.13   0.257    -.1493396    .5592922
             2020  |   .6249372   .2406412     2.60   0.009     .1532892    1.096585
------------------------------------------------------------------------------------

. xtpoisson socialleaderkilled L.convenio L.oil coca regalias i.ano, vce(robust) fe  
note: 904 groups (3614 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -581.19579  
Iteration 1:  Log pseudolikelihood =  -554.4032  
Iteration 2:  Log pseudolikelihood = -554.19093  
Iteration 3:  Log pseudolikelihood =  -554.1909  

Conditional fixed-effects Poisson regression         Number of obs    =    864
Group variable: codmpio                              Number of groups =    216

                                                     Obs per group:
                                                                  min =      4
                                                                  avg =    4.0
                                                                  max =      4

                                                     Wald chi2(6)     =  29.66
Log pseudolikelihood = -554.1909                     Prob > chi2      = 0.0000

                                      (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------------
                   |               Robust
socialleaderkilled | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
          convenio |
               L1. |   .3242682   .4319311     0.75   0.453    -.5223013    1.170838
                   |
               oil |
               L1. |  -.4851638   .5135642    -0.94   0.345    -1.491731    .5214035
                   |
              coca |   .1635745   .2704731     0.60   0.545    -.3665431     .693692
          regalias |  -1.55e-11   2.77e-11    -0.56   0.575    -6.99e-11    3.88e-11
                   |
               ano |
             2018  |   .5876517    .167452     3.51   0.000     .2594517    .9158516
             2019  |   .1979684   .1828464     1.08   0.279    -.1604039    .5563406
             2020  |   .6211431   .2403137     2.58   0.010     .1501369    1.092149
------------------------------------------------------------------------------------

. restore

. 
. xtpoisson homicidios L.convenio L.oil coca regalias i.ano, vce(robust) fe  
note: 30 groups (509 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -56930.645  
Iteration 1:  Log pseudolikelihood = -52806.044  
Iteration 2:  Log pseudolikelihood = -52729.719  
Iteration 3:  Log pseudolikelihood =  -52729.66  
Iteration 4:  Log pseudolikelihood =  -52729.66  

Conditional fixed-effects Poisson regression         Number of obs    = 19,306
Group variable: codmpio                              Number of groups =  1,090

                                                     Obs per group:
                                                                  min =     17
                                                                  avg =   17.7
                                                                  max =     18

                                                     Wald chi2(20)    = 446.35
Log pseudolikelihood = -52729.66                     Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |  -.0247499   .0513923    -0.48   0.630     -.125477    .0759772
             |
         oil |
         L1. |   .0417782   .0833126     0.50   0.616    -.1215114    .2050679
             |
        coca |   .2900358   .0691653     4.19   0.000     .1544743    .4255974
    regalias |  -1.96e-12   2.05e-12    -0.96   0.340    -5.99e-12    2.06e-12
             |
         ano |
       2004  |  -.1301969   .0275237    -4.73   0.000    -.1841423   -.0762516
       2005  |  -.2434467   .0307751    -7.91   0.000    -.3037647   -.1831286
       2006  |  -.2606815   .0362533    -7.19   0.000    -.3317367   -.1896263
       2007  |  -.2738432   .0339083    -8.08   0.000    -.3403023   -.2073841
       2008  |  -.3579286   .0370306    -9.67   0.000    -.4305071     -.28535
       2009  |  -.4231972   .0384725   -11.00   0.000    -.4986019   -.3477925
       2010  |  -.4460296   .0433538   -10.29   0.000    -.5310014   -.3610578
       2011  |  -.4312886   .0493774    -8.73   0.000    -.5280665   -.3345107
       2012  |  -.3677885   .0411738    -8.93   0.000    -.4484875   -.2870894
       2013  |  -.4194101   .0515651    -8.13   0.000    -.5204757   -.3183444
       2014  |  -.5739508   .0471345   -12.18   0.000    -.6663327   -.4815689
       2015  |  -.6108936   .0474008   -12.89   0.000    -.7037974   -.5179898
       2016  |   -.641431   .0445866   -14.39   0.000    -.7288192   -.5540429
       2017  |  -.6491634   .0436269   -14.88   0.000    -.7346707   -.5636562
       2018  |  -.5834414   .0481661   -12.11   0.000    -.6778453   -.4890375
       2019  |  -.5789954   .0453598   -12.76   0.000     -.667899   -.4900918
       2020  |  -.6594633   .0448614   -14.70   0.000      -.74739   -.5715366
------------------------------------------------------------------------------

. xtpoisson homicidios L.convenio L.metals coca regalias i.ano, vce(robust) fe
note: 30 groups (509 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -56930.645  
Iteration 1:  Log pseudolikelihood = -52618.107  
Iteration 2:  Log pseudolikelihood = -52542.224  
Iteration 3:  Log pseudolikelihood = -52542.166  
Iteration 4:  Log pseudolikelihood = -52542.166  

Conditional fixed-effects Poisson regression         Number of obs    = 19,306
Group variable: codmpio                              Number of groups =  1,090

                                                     Obs per group:
                                                                  min =     17
                                                                  avg =   17.7
                                                                  max =     18

                                                     Wald chi2(20)    = 442.89
Log pseudolikelihood = -52542.166                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |   .0420856   .0422974     0.99   0.320    -.0408159    .1249871
             |
      metals |
         L1. |  -.3774708   .0799274    -4.72   0.000    -.5341257   -.2208159
             |
        coca |   .2827911   .0673745     4.20   0.000     .1507395    .4148427
    regalias |  -2.30e-12   1.87e-12    -1.23   0.219    -5.97e-12    1.37e-12
             |
         ano |
       2004  |  -.1288693   .0286654    -4.50   0.000    -.1850524   -.0726861
       2005  |  -.2399448   .0303012    -7.92   0.000    -.2993341   -.1805556
       2006  |   -.260432   .0345849    -7.53   0.000    -.3282171   -.1926469
       2007  |  -.2683788   .0326419    -8.22   0.000    -.3323556   -.2044019
       2008  |  -.3490297   .0365621    -9.55   0.000    -.4206902   -.2773693
       2009  |  -.4036313   .0391201   -10.32   0.000    -.4803052   -.3269573
       2010  |   -.446611   .0421673   -10.59   0.000    -.5292574   -.3639647
       2011  |    -.42839   .0495333    -8.65   0.000    -.5254734   -.3313065
       2012  |  -.3718618   .0417617    -8.90   0.000    -.4537132   -.2900104
       2013  |  -.4221223   .0524049    -8.06   0.000     -.524834   -.3194105
       2014  |  -.5773748    .047261   -12.22   0.000    -.6700046   -.4847451
       2015  |  -.6166785   .0464301   -13.28   0.000    -.7076798   -.5256771
       2016  |  -.6440238   .0446493   -14.42   0.000    -.7315347   -.5565129
       2017  |   -.650417   .0434435   -14.97   0.000    -.7355648   -.5652693
       2018  |  -.5843699   .0467727   -12.49   0.000    -.6760426   -.4926971
       2019  |    -.57898   .0436413   -13.27   0.000    -.6645153   -.4934446
       2020  |  -.6570162   .0425985   -15.42   0.000    -.7405078   -.5735246
------------------------------------------------------------------------------

. 
. xtpoisson cont_arm L.convenio L.oil coca regalias i.ano, vce(robust) fe  
note: 980 groups (16659 obs) dropped because of all zero outcomes
note: coca omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -621.38495  
Iteration 1:  Log pseudolikelihood = -490.44313  
Iteration 2:  Log pseudolikelihood = -456.84978  
Iteration 3:  Log pseudolikelihood = -449.96412  
Iteration 4:  Log pseudolikelihood = -448.44759  
Iteration 5:  Log pseudolikelihood = -448.07799  
Iteration 6:  Log pseudolikelihood = -447.99954  
Iteration 7:  Log pseudolikelihood = -447.98298  
Iteration 8:  Log pseudolikelihood = -447.97928  
Iteration 9:  Log pseudolikelihood = -447.97837  
Iteration 10: Log pseudolikelihood = -447.97819  
Iteration 11: Log pseudolikelihood = -447.97815  
Iteration 12: Log pseudolikelihood = -447.97814  

Conditional fixed-effects Poisson regression       Number of obs    =    2,380
Group variable: codmpio                            Number of groups =      140

                                                   Obs per group:
                                                                min =       17
                                                                avg =     17.0
                                                                max =       17

                                                   Wald chi2(18)    = 29512.63
Log pseudolikelihood = -447.97814                  Prob > chi2      =   0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |  -.4394701   .5323171    -0.83   0.409    -1.482792    .6038522
             |
         oil |
         L1. |   .2831262   .5755787     0.49   0.623    -.8449874     1.41124
             |
    regalias |   1.88e-12   1.48e-11     0.13   0.899    -2.71e-11    3.09e-11
             |
         ano |
       2004  |     -1.151   .2400225    -4.80   0.000    -1.621436    -.680565
       2005  |  -.7510184   .2517084    -2.98   0.003    -1.244358    -.257679
       2006  |  -1.414719   .3260928    -4.34   0.000    -2.053849    -.775589
       2007  |  -2.030678   .3559764    -5.70   0.000    -2.728379   -1.332977
       2008  |  -2.328725   .3930117    -5.93   0.000    -3.099014   -1.558436
       2009  |  -1.636502   .3757149    -4.36   0.000     -2.37289   -.9001146
       2010  |  -2.008044   .3212331    -6.25   0.000    -2.637649   -1.378438
       2011  |  -1.825007   .2865139    -6.37   0.000    -2.386564   -1.263451
       2012  |  -2.139415   .4270745    -5.01   0.000    -2.976466   -1.302364
       2013  |  -3.068952   .5116204    -6.00   0.000     -4.07171   -2.066195
       2014  |  -2.368101   .4746853    -4.99   0.000    -3.298467   -1.437735
       2015  |  -3.748337   .6151739    -6.09   0.000    -4.954056   -2.542619
       2016  |  -19.19272   .2030818   -94.51   0.000    -19.59076   -18.79469
       2017  |  -19.19712    .201554   -95.25   0.000    -19.59216   -18.80209
       2018  |  -19.20528   .2109524   -91.04   0.000    -19.61874   -18.79182
       2019  |  -19.19535   .2017819   -95.13   0.000    -19.59084   -18.79987
------------------------------------------------------------------------------

. xtpoisson cont_arm L.convenio L.metals coca regalias i.ano, vce(robust) fe
note: 980 groups (16659 obs) dropped because of all zero outcomes
note: coca omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -621.38495  
Iteration 1:  Log pseudolikelihood = -490.21673  
Iteration 2:  Log pseudolikelihood = -456.39684  
Iteration 3:  Log pseudolikelihood = -449.49049  
Iteration 4:  Log pseudolikelihood = -447.96965  
Iteration 5:  Log pseudolikelihood = -447.59935  
Iteration 6:  Log pseudolikelihood = -447.52061  
Iteration 7:  Log pseudolikelihood =   -447.504  
Iteration 8:  Log pseudolikelihood =  -447.5003  
Iteration 9:  Log pseudolikelihood = -447.49939  
Iteration 10: Log pseudolikelihood = -447.49921  
Iteration 11: Log pseudolikelihood = -447.49917  
Iteration 12: Log pseudolikelihood = -447.49916  

Conditional fixed-effects Poisson regression       Number of obs    =    2,380
Group variable: codmpio                            Number of groups =      140

                                                   Obs per group:
                                                                min =       17
                                                                avg =     17.0
                                                                max =       17

                                                   Wald chi2(18)    = 29963.84
Log pseudolikelihood = -447.49916                  Prob > chi2      =   0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |
         L1. |  -.1491087   .2255285    -0.66   0.509    -.5911365    .2929192
             |
      metals |
         L1. |  -.6416671   .8256964    -0.78   0.437    -2.260002    .9766682
             |
    regalias |   1.93e-12   1.48e-11     0.13   0.896    -2.70e-11    3.09e-11
             |
         ano |
       2004  |  -1.149964   .2408704    -4.77   0.000    -1.622061   -.6778662
       2005  |  -.7537927   .2501836    -3.01   0.003    -1.244143   -.2634419
       2006  |  -1.437783   .3338523    -4.31   0.000    -2.092121   -.7834442
       2007  |  -2.025056   .3574774    -5.66   0.000    -2.725699   -1.324413
       2008  |  -2.320708   .3943747    -5.88   0.000    -3.093668   -1.547748
       2009  |  -1.614237   .3748889    -4.31   0.000    -2.349005   -.8794678
       2010  |  -2.008253   .3207299    -6.26   0.000    -2.636872   -1.379634
       2011  |  -1.848749    .281386    -6.57   0.000    -2.400256   -1.297243
       2012  |  -2.162347   .4224717    -5.12   0.000    -2.990376   -1.334317
       2013  |  -3.089137   .5234158    -5.90   0.000    -4.115013   -2.063261
       2014  |  -2.389528   .4819404    -4.96   0.000    -3.334114   -1.444942
       2015  |  -3.772736   .6116016    -6.17   0.000    -4.971453   -2.574019
       2016  |  -19.21774   .2157558   -89.07   0.000    -19.64061   -18.79487
       2017  |  -19.21759    .211846   -90.71   0.000     -19.6328   -18.80238
       2018  |  -19.22348   .2185513   -87.96   0.000    -19.65183   -18.79513
       2019  |  -19.21489   .2100702   -91.47   0.000    -19.62662   -18.80316
------------------------------------------------------------------------------

. 
. //panel but with restricted time period//
. preserve

. keep if ano < 2011
(12,315 observations deleted)

. xtpoisson o_amenazas convenio oil regalias i.ano, vce(robust) fe  
note: 36 groups (36 obs) dropped because of only one obs per group
note: 50 groups (199 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -40313.489  
Iteration 1:  Log pseudolikelihood = -35476.832  
Iteration 2:  Log pseudolikelihood = -35226.994  
Iteration 3:  Log pseudolikelihood = -35226.537  
Iteration 4:  Log pseudolikelihood = -35226.537  

Conditional fixed-effects Poisson regression         Number of obs    =  7,419
Group variable: codmpio                              Number of groups =    988

                                                     Obs per group:
                                                                  min =      2
                                                                  avg =    7.5
                                                                  max =      9

                                                     Wald chi2(10)    = 290.33
Log pseudolikelihood = -35226.537                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1463455    .108675    -1.35   0.178    -.3593445    .0666536
         oil |  -.0861064   .1654384    -0.52   0.603    -.4103598    .2381469
    regalias |  -1.57e-12   7.88e-12    -0.20   0.842    -1.70e-11    1.39e-11
             |
         ano |
       2003  |  -.3232503   .0573734    -5.63   0.000    -.4357001   -.2108005
       2004  |  -.4578464   .0497186    -9.21   0.000     -.555293   -.3603997
       2005  |  -.5947712    .060186    -9.88   0.000    -.7127335   -.4768089
       2006  |  -.7946353   .0582343   -13.65   0.000    -.9087724   -.6804983
       2007  |  -.9066866   .0609371   -14.88   0.000    -1.026121    -.787252
       2008  |  -.8764304   .0689461   -12.71   0.000    -1.011562   -.7412984
       2009  |  -.8656911    .107943    -8.02   0.000    -1.077256   -.6541266
       2010  |  -.6466303   .0843373    -7.67   0.000    -.8119285   -.4813322
------------------------------------------------------------------------------

. xtpoisson num_arrests convenio oil regalias i.ano, vce(robust) fe  
note: 1 group (1 obs) dropped because of only one obs per group
note: 908 groups (8172 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -5522.9216  
Iteration 1:  Log pseudolikelihood = -5041.3196  
Iteration 2:  Log pseudolikelihood = -5001.2592  
Iteration 3:  Log pseudolikelihood = -5001.1547  
Iteration 4:  Log pseudolikelihood = -5001.1547  

Conditional fixed-effects Poisson regression         Number of obs    =  1,908
Group variable: codmpio                              Number of groups =    212

                                                     Obs per group:
                                                                  min =      9
                                                                  avg =    9.0
                                                                  max =      9

                                                     Wald chi2(10)    =  80.12
Log pseudolikelihood = -5001.1547                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.6556137   .3822437    -1.72   0.086    -1.404798    .0935703
         oil |   1.096288   .4316829     2.54   0.011      .250205    1.942371
    regalias |  -9.83e-12   1.89e-11    -0.52   0.603    -4.69e-11    2.72e-11
             |
         ano |
       2003  |   .7878742   .4277397     1.84   0.065    -.0504802    1.626229
       2004  |   .6258145    .411887     1.52   0.129    -.1814691    1.433098
       2005  |   .1424657   .4418405     0.32   0.747    -.7235258    1.008457
       2006  |   .2482921   .4110631     0.60   0.546    -.5573767    1.053961
       2007  |   .0564763   .4114856     0.14   0.891    -.7500206    .8629733
       2008  |  -.0149787   .4844135    -0.03   0.975    -.9644116    .9344543
       2009  |  -.8011241   .3587413    -2.23   0.026    -1.504244   -.0980041
       2010  |  -.7283809    .565131    -1.29   0.197    -1.836017    .3792555
------------------------------------------------------------------------------

. xtpoisson homicidios convenio oil regalias i.ano, vce(robust) fe  
note: 42 groups (336 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =   -23679.7  
Iteration 1:  Log pseudolikelihood = -22399.815  
Iteration 2:  Log pseudolikelihood = -22390.024  
Iteration 3:  Log pseudolikelihood = -22390.023  

Conditional fixed-effects Poisson regression         Number of obs    =  8,624
Group variable: codmpio                              Number of groups =  1,078

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 162.75
Log pseudolikelihood = -22390.023                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0322135   .0445504    -0.72   0.470    -.1195306    .0551036
         oil |   -.038773   .0772136    -0.50   0.616    -.1901088    .1125628
    regalias |   1.18e-12   2.92e-12     0.40   0.687    -4.55e-12    6.91e-12
             |
         ano |
       2004  |  -.1282395   .0273355    -4.69   0.000    -.1818161   -.0746629
       2005  |  -.2440202   .0289756    -8.42   0.000    -.3008113   -.1872291
       2006  |  -.2631107   .0333441    -7.89   0.000    -.3284639   -.1977574
       2007  |  -.2725118   .0316535    -8.61   0.000    -.3345514   -.2104721
       2008  |    -.36065   .0348762   -10.34   0.000     -.429006    -.292294
       2009  |  -.4226548   .0388588   -10.88   0.000    -.4988166    -.346493
       2010  |  -.4486633   .0427423   -10.50   0.000    -.5324367   -.3648899
------------------------------------------------------------------------------

. xtpoisson cont_arm convenio oil regalias i.ano, vce(robust) fe  
note: 992 groups (7936 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -382.58368  
Iteration 1:  Log pseudolikelihood = -336.75912  
Iteration 2:  Log pseudolikelihood = -317.60804  
Iteration 3:  Log pseudolikelihood = -317.37761  
Iteration 4:  Log pseudolikelihood = -317.37743  
Iteration 5:  Log pseudolikelihood = -317.37743  

Conditional fixed-effects Poisson regression         Number of obs    =  1,024
Group variable: codmpio                              Number of groups =    128

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 101.76
Log pseudolikelihood = -317.37743                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .1326389   .4590868     0.29   0.773    -.7671547    1.032433
         oil |   .0619149   .6475572     0.10   0.924    -1.207274    1.331104
    regalias |   3.21e-11   2.32e-11     1.38   0.167    -1.34e-11    7.75e-11
             |
         ano |
       2004  |  -1.148239   .2326931    -4.93   0.000     -1.60431   -.6921694
       2005  |  -.7284699   .2303079    -3.16   0.002    -1.179865   -.2770746
       2006  |  -1.378924   .2957422    -4.66   0.000    -1.958568   -.7992797
       2007  |  -2.055028    .351758    -5.84   0.000    -2.744461   -1.365595
       2008  |  -2.398999    .387104    -6.20   0.000    -3.157709   -1.640289
       2009  |  -1.674226   .3617232    -4.63   0.000     -2.38319   -.9652614
       2010  |  -2.075241   .3159972    -6.57   0.000    -2.694584   -1.455898
------------------------------------------------------------------------------

. 
. xtpoisson o_amenazas convenio metals regalias i.ano, vce(robust) fe
note: 36 groups (36 obs) dropped because of only one obs per group
note: 50 groups (199 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -40313.489  
Iteration 1:  Log pseudolikelihood = -35457.456  
Iteration 2:  Log pseudolikelihood = -35206.364  
Iteration 3:  Log pseudolikelihood = -35205.914  
Iteration 4:  Log pseudolikelihood = -35205.914  

Conditional fixed-effects Poisson regression         Number of obs    =  7,419
Group variable: codmpio                              Number of groups =    988

                                                     Obs per group:
                                                                  min =      2
                                                                  avg =    7.5
                                                                  max =      9

                                                     Wald chi2(10)    = 292.64
Log pseudolikelihood = -35205.914                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  o_amenazas | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.1451688   .0807665    -1.80   0.072    -.3034683    .0131307
      metals |  -.2276863    .247368    -0.92   0.357    -.7125187    .2571461
    regalias |  -1.60e-12   7.82e-12    -0.20   0.838    -1.69e-11    1.37e-11
             |
         ano |
       2003  |  -.3247876   .0576938    -5.63   0.000    -.4378654   -.2117098
       2004  |  -.4591125   .0499949    -9.18   0.000    -.5571008   -.3611242
       2005  |  -.6023838   .0592508   -10.17   0.000    -.7185132   -.4862543
       2006  |  -.7968194   .0590902   -13.48   0.000    -.9126341   -.6810047
       2007  |   -.906917   .0620097   -14.63   0.000    -1.028454   -.7853802
       2008  |  -.8710144   .0713109   -12.21   0.000    -1.010781   -.7312475
       2009  |  -.8657943   .1078234    -8.03   0.000    -1.077124   -.6544643
       2010  |  -.6484165   .0835637    -7.76   0.000    -.8121985   -.4846346
------------------------------------------------------------------------------

. xtpoisson num_arrests convenio metals regalias i.ano, vce(robust) fe
note: 1 group (1 obs) dropped because of only one obs per group
note: 908 groups (8172 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -5522.9216  
Iteration 1:  Log pseudolikelihood = -5068.2865  
Iteration 2:  Log pseudolikelihood = -5031.2941  
Iteration 3:  Log pseudolikelihood = -5031.2144  
Iteration 4:  Log pseudolikelihood = -5031.2144  

Conditional fixed-effects Poisson regression         Number of obs    =  1,908
Group variable: codmpio                              Number of groups =    212

                                                     Obs per group:
                                                                  min =      9
                                                                  avg =    9.0
                                                                  max =      9

                                                     Wald chi2(10)    =  66.70
Log pseudolikelihood = -5031.2144                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
 num_arrests | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .1381781   .2057816     0.67   0.502    -.2651463    .5415026
      metals |  -.5619307   .6765348    -0.83   0.406    -1.887915    .7640532
    regalias |  -1.17e-11   1.97e-11    -0.59   0.552    -5.03e-11    2.69e-11
             |
         ano |
       2003  |   .8443798   .4135334     2.04   0.041     .0338693     1.65489
       2004  |   .6535348   .4094563     1.60   0.110    -.1489848    1.456054
       2005  |   .1966539   .4412065     0.45   0.656    -.6680949    1.061403
       2006  |   .2863248   .4116983     0.70   0.487    -.5205891    1.093239
       2007  |   .0950204   .4145997     0.23   0.819      -.71758    .9076208
       2008  |  -.0056461   .4887852    -0.01   0.991    -.9636475    .9523552
       2009  |  -.8368039   .3595763    -2.33   0.020    -1.541561   -.1320474
       2010  |  -.7094476     .56037    -1.27   0.206    -1.807753    .3888573
------------------------------------------------------------------------------

. xtpoisson homicidios convenio metals regalias i.ano, vce(robust) fe
note: 42 groups (336 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood =   -23679.7  
Iteration 1:  Log pseudolikelihood = -22401.163  
Iteration 2:  Log pseudolikelihood = -22391.375  
Iteration 3:  Log pseudolikelihood = -22391.374  

Conditional fixed-effects Poisson regression         Number of obs    =  8,624
Group variable: codmpio                              Number of groups =  1,078

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     = 162.90
Log pseudolikelihood = -22391.374                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
  homicidios | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |  -.0502643   .0390715    -1.29   0.198     -.126843    .0263144
      metals |   .0151452   .0762615     0.20   0.843    -.1343246     .164615
    regalias |   1.03e-12   2.90e-12     0.36   0.722    -4.66e-12    6.72e-12
             |
         ano |
       2004  |  -.1289601   .0275883    -4.67   0.000    -.1830321   -.0748881
       2005  |  -.2449977   .0290612    -8.43   0.000    -.3019566   -.1880388
       2006  |  -.2635643   .0334009    -7.89   0.000    -.3290288   -.1980999
       2007  |  -.2734652   .0316487    -8.64   0.000    -.3354955   -.2114349
       2008  |  -.3608869   .0350037   -10.31   0.000    -.4294928   -.2922809
       2009  |   -.421232   .0387951   -10.86   0.000    -.4972691   -.3451949
       2010  |  -.4485546    .042674   -10.51   0.000    -.5321941   -.3649151
------------------------------------------------------------------------------

. xtpoisson cont_arm convenio metals regalias i.ano, vce(robust) fe
note: 992 groups (7936 obs) dropped because of all zero outcomes

Iteration 0:  Log pseudolikelihood = -382.58368  
Iteration 1:  Log pseudolikelihood = -336.40773  
Iteration 2:  Log pseudolikelihood = -317.30375  
Iteration 3:  Log pseudolikelihood =   -317.073  
Iteration 4:  Log pseudolikelihood = -317.07283  
Iteration 5:  Log pseudolikelihood = -317.07283  

Conditional fixed-effects Poisson regression         Number of obs    =  1,024
Group variable: codmpio                              Number of groups =    128

                                                     Obs per group:
                                                                  min =      8
                                                                  avg =    8.0
                                                                  max =      8

                                                     Wald chi2(9)     =  97.13
Log pseudolikelihood = -317.07283                    Prob > chi2      = 0.0000

                                (Std. err. adjusted for clustering on codmpio)
------------------------------------------------------------------------------
             |               Robust
    cont_arm | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
    convenio |   .2355968   .3915545     0.60   0.547    -.5318359     1.00303
      metals |  -.5314458   .7931703    -0.67   0.503    -2.086031    1.023139
    regalias |   3.33e-11   2.42e-11     1.38   0.169    -1.41e-11    8.07e-11
             |
         ano |
       2004  |  -1.149323   .2360491    -4.87   0.000    -1.611971   -.6866753
       2005  |  -.7420315   .2351994    -3.15   0.002    -1.203014   -.2810493
       2006  |  -1.376839   .2982186    -4.62   0.000    -1.961336   -.7923409
       2007  |  -2.044202   .3518796    -5.81   0.000    -2.733873   -1.354531
       2008  |  -2.367041    .386189    -6.13   0.000    -3.123958   -1.610125
       2009  |  -1.669243   .3631969    -4.60   0.000    -2.381096   -.9573901
       2010  |  -2.082116   .3191738    -6.52   0.000    -2.707685   -1.456546
------------------------------------------------------------------------------

. 
. 
. restore

. clear

. log close
      name:  <unnamed>
       log:  /Users/jamielee/Dropbox/Convenios de Fuerza Project w- JS/Journal Articles/LARR submission/LARR final submission/Replication_data/Logs/rep
> lication.log
  log type:  text
 closed on:  16 Dec 2025, 15:05:34
-------------------------------------------------------------------------------------------------------------------------------------------------------
